CVE-2023-25575
What it is
API Platform Core is the server component of API Platform: hypermedia and GraphQL APIs. 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. This issue impacts the 2.7, 3.0 and 3.1 branches. Please upgrade to versions 2.7.10, 3.0.12 or 3.1.3. As a workaround, 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.
At a glance
- Exploitability
- Can be exploited over the network with a low-privilege account. High risk of data exposure.
- Exploit odds
- 0.6% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.6% in the next 30 days (EPSS).
- Severity: 7.7 HIGH (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.6% · EPSS, next 30 days
- Weakness
- CWE-842
- Record status
- Modified
Affected
- api-platform Core < 2.7.10
- api-platform Core < 3.0.12
- api-platform Core < 3.1.3
Attack profile CVSS 3.1 · 7.7
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2023-25575.md and follow it. Check whether this project is affected by CVE-2023-25575. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/api-platform/core/commit/5723d68369722feefeb11e42528d9580db5dd0fb
- https://github.com/api-platform/core/security/advisories/GHSA-vr2x-7687-h6qv
- https://github.com/api-platform/core/commit/5723d68369722feefeb11e42528d9580db5dd0fb
- https://github.com/api-platform/core/security/advisories/GHSA-vr2x-7687-h6qv
References
- https://github.com/api-platform/core/commit/5723d68369722feefeb11e42528d9580db5dd0fb
- https://github.com/api-platform/core/security/advisories/GHSA-vr2x-7687-h6qv
- https://github.com/api-platform/core/commit/5723d68369722feefeb11e42528d9580db5dd0fb
- https://github.com/api-platform/core/security/advisories/GHSA-vr2x-7687-h6qv