Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS12cjJ4LTc2ODctaDZxds4AAx3r

api-platform/core's secured properties may be accessible within collections

Impact

Resource properties secured with the security option of the ApiPlatform\Metadata\ApiProperty attribute can be disclosed to unauthorized users. The problem affects most serialization formats, including raw JSON, which is enabled by default when installing API Platform. Custom serialization formats may also be impacted. Only collection endpoints are affected by the issue, item endpoints are not. The JSON-LD format is not affected by the issue.

The result of the security rule is only executed for the first item of the collection. The result of the rule is then cached and reused for the next items. This bug can leak data to unauthorized users when the rule depends on the value of a property of the item. This bug can also hide properties that should be displayed to authorized users.

Patches

This issue impacts the 2.7, 3.0 and 3.1 branches. Upgrade to v2.7.10, v3.0.12 or v3.1.3.

Workarounds

Replace the cache_key of the context array of the Serializer inside a custom normalizer that works on objects if the security option of the ApiPlatform\Metadata\ApiProperty attribute is used.

Permalink: https://github.com/advisories/GHSA-vr2x-7687-h6qv
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS12cjJ4LTc2ODctaDZxds4AAx3r
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 1 year ago
Updated: about 1 year ago


CVSS Score: 7.7
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Identifiers: GHSA-vr2x-7687-h6qv, CVE-2023-25575
References: Repository: https://github.com/api-platform/core
Blast Radius: 28.0

Affected Packages

packagist:api-platform/core
Dependent packages: 228
Dependent repositories: 4,312
Downloads: 28,652,524 total
Affected Version Ranges: >= 2.6.0, < 2.7.10, >= 3.1.0, < 3.1.3, >= 3.0.0, < 3.0.12
Fixed in: 2.7.10, 3.1.3, 3.0.12
All affected versions: 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6, 2.6.7, 2.6.8, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7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