CVE-2020-15143

CVE-2020-15143 is a high-severity security vulnerability in sylius/resource-bundle (composer), affecting versions >= 1.4.0, < 1.4.7. It is fixed in 1.4.7, 1.5.2, 1.6.4, 1.3.14.

Summary

Example

foo:
    path: /foo/{id}
    defaults:
        _sylius:
            repository:
                method: findSome
                arguments:
                    entity: "expr:service('repository').find($id)"

In this case, $id can be prepared in a way that calls other services.

If you visit /foo/"~service('doctrine').getManager().getConnection().executeQuery("DELETE * FROM TABLE")~", it will result in a following expression expr:service('repository').find(""~service('doctrine').getManager().getConnection().executeQuery("DELETE * FROM TABLE")~""), which will execute a query on the currently connected database.

To find a vulnerability in your application, look for any routing definition that uses request parameters inside expression language.

Workarounds

The fix requires adding addslashes in ParametersParser::parseRequestValueExpression to sanitize user input before evaluating it using the expression language.

- return is_string($variable) ? sprintf('"%s"', $variable) : $variable;
+ return is_string($variable) ? sprintf('"%s"', addslashes($variable)) : $variable;

Acknowledgements

This security issue has been reported by Craig Blanchette (@isometriks), thanks a lot!

For more information

If you have any questions or comments about this advisory:

Impact

Request parameters injected inside an expression evaluated by symfony/expression-language package haven't been sanitized properly. This allows the attacker to access any public service by manipulating that request parameter, allowing for Remote Code Execution.

The vulnerable versions include: <=1.3.13 || >=1.4.0 <=1.4.6 || >=1.5.0 <=1.5.1 || >=1.6.0 <=1.6.3.

CVE-2020-15143 has a CVSS score of 7.7 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.4.7, 1.5.2, 1.6.4, 1.3.14); upgrading removes the vulnerable code path.

Affected versions

sylius/resource-bundle (>= 1.4.0, < 1.4.7) sylius/resource-bundle (>= 1.5.0, < 1.5.2) sylius/resource-bundle (>= 1.6.0, < 1.6.4) sylius/resource-bundle (>= 1.0.0, < 1.3.14)

Security releases

sylius/resource-bundle → 1.4.7 (composer) sylius/resource-bundle → 1.5.2 (composer) sylius/resource-bundle → 1.6.4 (composer) sylius/resource-bundle → 1.3.14 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

This issue has been patched for versions 1.3.14, 1.4.7, 1.5.2 and 1.6.4. Versions prior to 1.3 were not patched.

Frequently Asked Questions

  1. What is CVE-2020-15143? CVE-2020-15143 is a high-severity security vulnerability in sylius/resource-bundle (composer), affecting versions >= 1.4.0, < 1.4.7. It is fixed in 1.4.7, 1.5.2, 1.6.4, 1.3.14.
  2. How severe is CVE-2020-15143? CVE-2020-15143 has a CVSS score of 7.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of sylius/resource-bundle are affected by CVE-2020-15143? sylius/resource-bundle (composer) versions >= 1.4.0, < 1.4.7 is affected.
  4. Is there a fix for CVE-2020-15143? Yes. CVE-2020-15143 is fixed in 1.4.7, 1.5.2, 1.6.4, 1.3.14. Upgrade to this version or later.
  5. Is CVE-2020-15143 exploitable, and should I be worried? Whether CVE-2020-15143 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2020-15143 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2020-15143?
    • Upgrade sylius/resource-bundle to 1.4.7 or later
    • Upgrade sylius/resource-bundle to 1.5.2 or later
    • Upgrade sylius/resource-bundle to 1.6.4 or later
    • Upgrade sylius/resource-bundle to 1.3.14 or later

Other vulnerabilities in sylius/resource-bundle

Stop the waste.
Protect your environment with Kodem.