Uploaded image for project: 'PUBLIC - Liferay Portal Enterprise Edition'
  1. PUBLIC - Liferay Portal Enterprise Edition
  2. LPE-15902

Velocity and FreeMarker templates do not properly restrict the use of some variables (6.2, DE 7.0)

    Details

    • Fix Pack Status:
      Scheduled
    • 7.0 Fix Pack Version:
      18

      Description

      Velocity and FreeMarker templates does not properly restrict the use of some variables, which allow any user with permission to create a template to insert arbitrary code in any page, prevent access to the portal or access private information stored in the portal.

      The fix includes the following configuration changes:

      • DXP 7.0:
        • System Settings - Foundation - FreeMarker Engine: "Restricted Variables" as below:
          serviceLocator|utilLocator|objectUtil|staticFieldGetter|staticUtil
          
        • System Settings - Foundation - Velocity Engine: "Restricted Variables" as below:
          serviceLocator|staticFieldGetter|utilLocator
          
      • 6.1, 6.2 EE: portal properties as below:
            #
            # Set a comma delimited list of variables the Velocity engine cannot
            # have access to. This will affect Dynamic Data List templates, Journal
            # templates, and Portlet Display templates.
            #
            velocity.engine.restricted.variables=\
                serviceLocator,\
                staticFieldGetter,\
                utilLocator
        
            #
            # Set a comma delimited list of variables the FreeMarker engine cannot
            # have access to. This will affect Dynamic Data List templates, Journal
            # templates, and Portlet Display templates.
            #
            freemarker.engine.restricted.variables=\
                objectUtil,\
                serviceLocator,\
                staticFieldGetter,\
                staticUtil,\
                utilLocator
        

      Please also see https://web.liferay.com/group/customer/products/portal/security-vulnerability/lsv-327.

        Attachments

          Activity

            People

            Assignee:
            joshua.cords Joshua Cords
            Reporter:
            EnterpriseReleaseHU Enterprise Release HU
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                6.2.X EE
                7.0.X EE