CVE-2020-5220 — resource-bundle
MEDIUMCVE-2020-5220 is a medium-severity (CVSS 5.3) CWE-444 vulnerability in sylius/resource-bundle. A fix is available for sylius/resource-bundle — see the affected versions and patch details below.
Ability to expose data in Sylius by using an unintended serialisation group
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/sylius🐘sylius/sylius🐘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
ResourceBundle accepts and uses any serialisation groups to be passed via a HTTP header. This might lead to data exposure by using an unintended serialisation group - for example it could make Shop API use a more permissive group from Admin API.
Anyone exposing an API with ResourceBundle's controller is affected. The vulnerable versions are: <1.3 || >=1.3.0 <=1.3.12 || >=1.4.0 <=1.4.5 || >=1.5.0 <=1.5.0 || >=1.6.0 <=1.6.2.
Patches
The patch is provided for ResourceBundle 1.3.13, 1.4.6, 1.5.1 and 1.6.3, but not for any versions below 1.3.
After it is applied, It allows to choose only the groups that are defined in serialization_groups or allowed_serialization_groups route definition. Any group not defined in those will not be used.
This behaviour might be a BC break for those using custom groups via the HTTP header, please adjust allowed_serialization_groups accordingly.
Workarounds
Service sylius.resource_controller.request_configuration_factory can be overridden with an implementation copied from \Sylius\Bundle\ResourceBundle\Controller\RequestConfigurationFactory where the part that handles custom serialisation groups is deleted.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | sylius/resource-bundle | ≥ 1.4.0&&< 1.4.6 | 1.4.6composer require sylius/resource-bundle:^1.4.6 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.5.0&&< 1.5.1 | 1.5.1composer require sylius/resource-bundle:^1.5.1 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.6.0&&< 1.6.3 | 1.6.3composer require sylius/resource-bundle:^1.6.3 |
| 🐘Packagist | sylius/sylius | all versions | 1.3.12composer require sylius/sylius:^1.3.12 |
| 🐘Packagist | sylius/sylius | ≥ 1.4.0&&< 1.4.4 | 1.4.4composer require sylius/sylius:^1.4.4 |
| 🐘Packagist | sylius/resource-bundle | ≥ 1.0.0&&< 1.3.13 | 1.3.13composer require sylius/resource-bundle:^1.3.13 |
Affected Products
syliusresourcebundlesyliusDetection & 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.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-5220 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Frequently Asked Questions
Is CVE-2020-5220 in your dependencies?
Find it across Packagist, including transitive dependencies.