GHSA-pjhx-3c3w-9v23

Suggest an improvement
Source
https://github.com/advisories/GHSA-pjhx-3c3w-9v23
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-pjhx-3c3w-9v23
Aliases
Published
2026-07-10T14:32:01Z
Modified
2026-07-10T14:46:38Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
API Platform Core vulnerable to cross-user attribute leak in JSON:API and HAL item normalizers due to missing isCacheKeySafe gate
Details

Impact

#[ApiProperty(security: ...)] is evaluated per request to decide whether a property is exposed. The componentsCache arrays in ApiPlatform\JsonApi\Serializer\ItemNormalizer and ApiPlatform\Hal\Serializer\ItemNormalizer are keyed on $context['cache_key'], which is set unconditionally before delegating to the parent normalizer. The component structure (attributes, relationships, links) computed for one request can therefore be reused for a subsequent request whose user has a different set of accessible properties. A user with lower privileges may end up seeing the structure of properties that the security predicate would otherwise have hidden for them.

This is the same vulnerability class as GHSA-428q-q3vv-3fq3 / CVE-2025-31485, which fixed only the GraphQL ItemNormalizer. The JSON:API and HAL paths were not addressed at the time.

Exploitation conditions

Exploitation requires all of the following to coincide:

  • The application exposes a resource via the JSON:API and/or HAL formats.
  • At least one property of that resource uses #[ApiProperty(security: ...)] with a predicate whose result depends on the current user (or on per-request state).
  • A request from a user for whom the predicate evaluates to true populates componentsCache before a request from a user for whom the predicate evaluates to false, within the lifetime of the same PHP process.
  • The deployment uses a long-running PHP runtime that keeps the normalizer instance alive across requests (FrankenPHP worker mode, RoadRunner, Swoole, ReactPHP, etc.). With classic php-fpm workers the cache only survives the duration of a single request, which makes the issue much harder to observe in practice.

Patches

  • 4.1.29
  • 4.2.25
  • 4.3.8

All three branches receive patched releases of api-platform/core, api-platform/json-api, and api-platform/hal.

Workarounds

Override the JSON:API and HAL ItemNormalizer services to gate $context['cache_key'] with a resource-class security check, or avoid #[ApiProperty(security: ...)] on resources served as JSON:API or HAL until the patch is applied. Pinning the deployment to classic php-fpm workers also limits exposure since the cache does not survive across requests.

Credits

  • Tillmann Baumgart (@tillmon) — originally identified the broader cache-key gap and proposed moving isCacheKeySafe to AbstractItemNormalizer.
  • Antoine Bluchet (@soyuka) — extended the gate to JSON:API and HAL normalizers.
Database specific
{
    "cwe_ids":  [
        "CWE-524",
        "CWE-639"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-10T14:32:01Z",
    "nvd_published_at":  "2026-07-01T20:17:10Z",
    "severity":  "MODERATE"
}
References

Affected packages

Packagist
api-platform/core

Package

Name
api-platform/core
Purl
pkg:composer/api-platform/core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.0
Fixed
4.1.29

Affected versions

v2.*
v2.6.0
v2.6.1
v2.6.2
v2.6.3.alpha
v2.6.3-alpha.1
v2.6.3
v2.6.4
v2.6.5
v2.6.6
v2.6.7
v2.6.8
v2.7.0-alpha.1
v2.7.0-alpha.2
v2.7.0-alpha.3
v2.7.0-alpha.4
v2.7.0-alpha.5
v2.7.0-alpha.6
v2.7.0-alpha.7
v2.7.0-beta.1
v2.7.0-beta.2
v2.7.0-beta.3
v2.7.0-beta.4
v2.7.0-beta.5
v2.7.0-rc.1
v2.7.0-rc.2
v2.7.0
v2.7.1
v2.7.2
v2.7.3
v2.7.4
v2.7.5
v2.7.6
v2.7.7
v2.7.8
v2.7.9
v2.7.10
v2.7.11
v2.7.12
v2.7.13
v2.7.14
v2.7.15
v2.7.16
v2.7.17
v2.7.18
v3.*
v3.0.0-beta.1
v3.0.0-beta.2
v3.0.0-rc.1
v3.0.0-rc.2
v3.0.0
v3.0.1
v3.0.2
v3.0.3
v3.0.4
v3.0.5
v3.0.6
v3.0.7
v3.0.8
v3.0.9
v3.0.10
v3.0.11
v3.0.12
v3.1.0
v3.1.1
v3.1.2
v3.1.3
v3.1.4
v3.1.5
v3.1.6
v3.1.7
v3.1.8
v3.1.9
v3.1.10
v3.1.11
v3.1.12
v3.1.13
v3.1.14
v3.1.15
v3.1.16
v3.1.17
v3.1.18
v3.1.19
v3.1.20
v3.1.21
v3.1.22
v3.1.23
v3.1.24
v3.1.25
v3.1.26
v3.1.27
v3.1.28
v3.1.29
v3.2.0-alpha.1
v3.2.0-alpha.2
v3.2.0-beta.1
v3.2.0-beta.2
v3.2.0
v3.2.1
v3.2.2
v3.2.3
v3.2.4
v3.2.5
v3.2.6
v3.2.7
v3.2.8
v3.2.9
v3.2.10
v3.2.11
v3.2.12
v3.2.13
v3.2.14
v3.2.15
v3.2.16
v3.2.17
v3.2.18
v3.2.19
v3.2.20
v3.2.21
v3.2.22
v3.2.23
v3.2.24
v3.2.25
v3.2.26
v3.3.0-alpha.1
v3.3.0-alpha.2
v3.3.0-beta.1
v3.3.0-beta.2
v3.3.0
v3.3.1
v3.3.2
v3.3.3
v3.3.4
v3.3.5
v3.3.6
v3.3.7
v3.3.8
v3.3.9
v3.3.10
v3.3.11
v3.3.12
v3.3.13
v3.3.14
v3.3.15
v3.4.0-alpha.1
v3.4.0-alpha.2
v3.4.0-alpha.3
v3.4.0-alpha.4
v3.4.0-alpha.5
v3.4.0-alpha.6
v3.4.0-alpha.7
v3.4.0-beta.1
v3.4.0
v3.4.1
v3.4.2
v3.4.3
v3.4.4
v3.4.5
v3.4.6
v3.4.7
v3.4.8
v3.4.9
v3.4.10
v3.4.11
v3.4.14
v3.4.15
v3.4.16
v3.4.17
v4.*
v4.0.0-alpha.1
v4.0.0-alpha.2
v4.0.0-alpha.3
v4.0.0-alpha.4
v4.0.0-alpha.5
v4.0.0-alpha.6
v4.0.0-alpha.7
v4.0.0-beta.1
v4.0.0-beta.2
v4.0.0
v4.0.1
v4.0.2
v4.0.3
v4.0.4
v4.0.5
v4.0.6
v4.0.7
v4.0.8
v4.0.9
v4.0.10
v4.0.11
v4.0.12
v4.0.13
v4.0.14
v4.0.15
v4.0.16
v4.0.17
v4.0.18
v4.0.19
v4.0.20
v4.0.21
v4.0.22
v4.1.0-alpha.1
v4.1.0-alpha.2
v4.1.0-beta.1
v4.1.0-beta.2
v4.1.0
v4.1.1
v4.1.2
v4.1.3
v4.1.4
v4.1.5
v4.1.6
v4.1.7
v4.1.8
v4.1.9
v4.1.10
v4.1.11
v4.1.12
v4.1.15
v4.1.16
v4.1.17
v4.1.18
v4.1.19
v4.1.20
v4.1.21
v4.1.22
v4.1.23
v4.1.24
v4.1.25
v4.1.26
v4.1.27
v4.1.28
4.*
4.1.14

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/core

Package

Name
api-platform/core
Purl
pkg:composer/api-platform/core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.0
Fixed
4.2.25

Affected versions

v4.*
v4.2.0
v4.2.1
v4.2.2
v4.2.3
v4.2.4
v4.2.5
v4.2.6
v4.2.7
v4.2.8
v4.2.9
v4.2.10
v4.2.11
v4.2.12
v4.2.13
v4.2.14
v4.2.15
v4.2.16
v4.2.17
v4.2.18
v4.2.19
v4.2.20
v4.2.21
v4.2.22
v4.2.23
v4.2.24

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/core

Package

Name
api-platform/core
Purl
pkg:composer/api-platform/core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.3.0
Fixed
4.3.8

Affected versions

v4.*
v4.3.0
v4.3.1
v4.3.2
v4.3.3
v4.3.4
v4.3.5
v4.3.6
v4.3.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/json-api

Package

Name
api-platform/json-api
Purl
pkg:composer/api-platform/json-api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.0.0
Fixed
4.1.29

Affected versions

v4.*
v4.0.0
v4.0.1
v4.0.2
v4.0.3
v4.0.4
v4.0.5
v4.0.6
v4.0.7
v4.0.8
v4.0.9
v4.0.10
v4.0.11
v4.0.12
v4.0.13
v4.0.14
v4.0.15
v4.0.16
v4.0.17
v4.0.18
v4.0.19
v4.0.20
v4.0.21
v4.0.22
v4.1.0-alpha.1
v4.1.0-alpha.2
v4.1.0-beta.1
v4.1.0-beta.2
v4.1.0
v4.1.1
v4.1.2
v4.1.3
v4.1.4
v4.1.5
v4.1.6
v4.1.7
v4.1.8
v4.1.9
v4.1.10
v4.1.11
v4.1.12
v4.1.15
v4.1.16
v4.1.17
v4.1.18
v4.1.19
v4.1.20
v4.1.21
v4.1.22
v4.1.23
v4.1.24
v4.1.25
v4.1.26
v4.1.27
v4.1.28
4.*
4.1.14

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/json-api

Package

Name
api-platform/json-api
Purl
pkg:composer/api-platform/json-api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.0
Fixed
4.2.25

Affected versions

v4.*
v4.2.0
v4.2.1
v4.2.2
v4.2.3
v4.2.4
v4.2.5
v4.2.6
v4.2.7
v4.2.8
v4.2.9
v4.2.10
v4.2.11
v4.2.12
v4.2.13
v4.2.14
v4.2.15
v4.2.16
v4.2.17
v4.2.18
v4.2.19
v4.2.20
v4.2.21
v4.2.22
v4.2.23
v4.2.24

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/json-api

Package

Name
api-platform/json-api
Purl
pkg:composer/api-platform/json-api

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.3.0
Fixed
4.3.8

Affected versions

v4.*
v4.3.0
v4.3.1
v4.3.2
v4.3.3
v4.3.4
v4.3.5
v4.3.6
v4.3.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/hal

Package

Name
api-platform/hal
Purl
pkg:composer/api-platform/hal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.0.0
Fixed
4.1.29

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/hal

Package

Name
api-platform/hal
Purl
pkg:composer/api-platform/hal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.2.0
Fixed
4.2.25

Affected versions

v4.*
v4.2.3
v4.2.4
v4.2.5
v4.2.6
v4.2.7
v4.2.8
v4.2.9
v4.2.10
v4.2.11
v4.2.12
v4.2.13
v4.2.14
v4.2.15
v4.2.16
v4.2.17
v4.2.18
v4.2.19
v4.2.20
v4.2.21
v4.2.22
v4.2.23
v4.2.24

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"
api-platform/hal

Package

Name
api-platform/hal
Purl
pkg:composer/api-platform/hal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.3.0
Fixed
4.3.8

Affected versions

v4.*
v4.3.0
v4.3.1
v4.3.2
v4.3.3
v4.3.4
v4.3.5
v4.3.6
v4.3.7

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-pjhx-3c3w-9v23/GHSA-pjhx-3c3w-9v23.json"