# CVE-2023-25575: Secured properties in API Platform Core may be accessible within collections

> Unauthorized users can access secured resource properties in collection endpoints due to cached security rule results, leaking sensitive data.

- **Severity:** High 7.7 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Feb 2023
- **Updated:** 7 Mar 2025
- **Also known as:** GHSA-vr2x-7687-h6qv

## What is CVE-2023-25575?

CVE-2023-25575 is a high-severity missing authorization vulnerability in api-platform core, published on 28 Feb 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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.

Weakness: CWE-863 (Incorrect Authorization), CWE-842 (Placement of User into Incorrect Group)

## Which versions are affected by CVE-2023-25575?

6 open source packages ship an affected version, including api-platform/core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `api-platform/core` | Packagist | From 2.6.0 | 2.7.10 |
| `api-platform/core` | Packagist | From 2.6.0 | 2.7.10 |
| `api-platform/core` | Packagist | From 3.0.0 | 3.0.12 |
| `api-platform/core` | Packagist | From 3.0.0 | 3.0.12 |
| `api-platform/core` | Packagist | From 3.1.0 | 3.1.3 |
| `api-platform/core` | Packagist | From 3.1.0 | 3.1.3 |

Products: Api-Platform Core.

## How do I fix CVE-2023-25575?

Upgrade api-platform/core to a fixed version for your release line: 2.7.10, 3.0.12 or 3.1.3.

## Is CVE-2023-25575 being exploited?

There is no known exploitation of CVE-2023-25575 in the wild and no public exploit code.

## Other vulnerabilities in api-platform core

- [CVE-2019-1000011](https://insights.sbomify.com/CVE-2019-1000011/): Incorrect Access Control vulnerability in api-platform/core (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-25575 and fix it if it is affected.

What it is: CVE-2023-25575 is a high-severity missing authorization vulnerability in api-platform core, published on 28 Feb 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-25575 in the wild and no public exploit code.

Affected packages and fixed versions:
- api-platform/core (Packagist): affected from 2.6.0; fixed in 2.7.10
- api-platform/core (Packagist): affected from 2.6.0; fixed in 2.7.10
- api-platform/core (Packagist): affected from 3.0.0; fixed in 3.0.12
- api-platform/core (Packagist): affected from 3.0.0; fixed in 3.0.12
- api-platform/core (Packagist): affected from 3.1.0; fixed in 3.1.3
- api-platform/core (Packagist): affected from 3.1.0; fixed in 3.1.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-25575/ (Markdown: https://insights.sbomify.com/CVE-2023-25575/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-25575
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-25575
- OSV: https://osv.dev/vulnerability/CVE-2023-25575

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-25575/
Summaries are generated and may contain mistakes; the official description above is the record.
