Skip to content

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

Moderate severity GitHub Reviewed Published Jan 27, 2020 in Sylius/SyliusResourceBundle • Updated Feb 7, 2024

Package

composer sylius/resource-bundle (Composer)

Affected versions

>= 1.4.0, < 1.4.6
>= 1.5.0, < 1.5.1
>= 1.6.0, < 1.6.3
>= 1.0.0, < 1.3.13

Patched versions

1.4.6
1.5.1
1.6.3
1.3.13
composer sylius/sylius (Composer)
< 1.3.12
>= 1.4.0, < 1.4.4
1.3.12
1.4.4

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.

References

@pamil pamil published to Sylius/SyliusResourceBundle Jan 27, 2020
Reviewed Jan 27, 2020
Published by the National Vulnerability Database Jan 27, 2020
Published to the GitHub Advisory Database Jan 31, 2020
Last updated Feb 7, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N

EPSS score

0.071%
(32nd percentile)

CVE ID

CVE-2020-5220

GHSA ID

GHSA-8vp7-j5cj-vvm2

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.