CVE-2017-16654: Intl bundle readers breaking out of paths
November 17, 2017 • Published by Fabien Potencier
Affected versions
Symfony 2.7.0 to 2.7.37, 2.8.0 to 2.8.30, 3.2.0 to 3.2.13, and 3.3.0 to 3.3.12 versions of the Symfony Intl component are affected by this security issue.
The issue has been fixed in Symfony 2.7.38, 2.8.31, 3.2.14, 3.3.13, 3.4-BETA5, and 4.0-BETA5.
Note that no fixes are provided for Symfony 3.0 and 3.1 as they are not maintained anymore.
Description
The Intl component includes various bundle readers that are used to read resource
bundles from the local filesystem. The read()
methods of these classes use a
path and a locale to determine the language bundle to retrieve.
The locale argument value is commonly retrieved from untrusted user input (like a URL parameter). An attacker can use this argument to navigate to arbitrary directories via the dot-dot-slash attack.
Resolution
The fix implements a check on the built filename to not break out of
the path that was passed as an argument to the read()
method.
The patch for this issue is available here.
Credits
I would like to thank David Bohannon for reporting this security issue, Christian Flothmann for providing a fix, and the Symfony Core Team for reviewing the patch.
Manage your notification preferences to receive an email as soon as a Symfony security release is published.
Help the Symfony project!
As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.
Comments are closed.
To ensure that comments stay relevant, they are closed for old posts.
The links to the patch and to David's profile page are broken because of a "greater than" sign at the end of the URLs.