MediumGHSA-8vp7-j5cj-vvm2CVE-2020-5218CVE-2020-5220GHSA-prg5-hg25-8grq

Ability to expose data in Sylius by using an unintended serialisation group

Published 31 Jan 2020 · Updated 8 Jul 2026

Is your project on an affected sylius/resource-bundle?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=1.4.0 <1.4.6
Fixed in
1.4.6
Update to the fixed version for your release line, for example:composer require sylius/resource-bundle:^1.4.6
Affected
>=1.5.0 <1.5.1
Fixed in
1.5.1
Update to the fixed version for your release line, for example:composer require sylius/resource-bundle:^1.5.1
Affected
>=1.6.0 <1.6.3
Fixed in
1.6.3
Update to the fixed version for your release line, for example:composer require sylius/resource-bundle:^1.6.3
Affected
<1.3.12
Fixed in
1.3.12
Update to the fixed version for your release line, for example:composer require sylius/sylius:^1.3.12
Affected
>=1.4.0 <1.4.4
Fixed in
1.4.4
Update to the fixed version for your release line, for example:composer require sylius/sylius:^1.4.4
Affected
>=1.0.0 <1.3.13
Fixed in
1.3.13
Update to the fixed version for your release line, for example:composer require sylius/resource-bundle:^1.3.13

Details

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.

Is GHSA-8vp7-j5cj-vvm2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sylius/resource-bundle, and gives you the command that fixes it.

More advisories for sylius/resource-bundle

  • MediumGHSA-65v7-wg35-2qpmSylius Resource Bundle Cross-Site Request Forgery vulnerability · 29 May 2024
  • HighCVE-2020-15143Remote Code Execution in SyliusResourceBundle · 19 Aug 2020
  • CriticalCVE-2020-15146Remote Code Execution in SyliusResourceBundle · 19 Aug 2020
sylius/resource-bundle security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.