CVE-2020-15146 is a high-severity (CVSS 8.8) CWE-74 vulnerability in sylius/resource-bundle. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for sylius/resource-bundle — see the affected versions and patch details below.
Remote Code Execution in SyliusResourceBundle
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
sylius/resource-bundle🐘sylius/resource-bundle🐘sylius/resource-bundle🐘sylius/resource-bundleReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
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.
Example
sylius_grid:
grids:
foo:
fields:
bar:
options:
baz: "expr:service('sylius.repository.product').find($id)"
In this case, $id can be prepared in a way that calls other services.
If you visit /route?id="~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.
Patches
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.
Workarounds
The fix requires adding addslashes in OptionsParser::parseOptionExpression 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:
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | sylius/resource-bundle | ≥ 1.4.0&&< 1.4.7 | 1.4.7composer require sylius/resource-bundle:^1.4.7 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.5.0&&< 1.5.2 | 1.5.2composer require sylius/resource-bundle:^1.5.2 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.6.0&&< 1.6.4 | 1.6.4composer require sylius/resource-bundle:^1.6.4 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.0.0&&< 1.3.14 | 1.3.14composer require sylius/resource-bundle:^1.3.14 |
Affected Products
syliusresourcebundlesyliusResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sylius/resource-bundle, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update sylius/resource-bundle to 1.4.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-15146 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2020-15146 in your dependencies?
Find it across Packagist, including transitive dependencies.