Skip to content

Update dependency api-platform/core to v4 [SECURITY]#356

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/packagist-api-platform-core-vulnerability
Open

Update dependency api-platform/core to v4 [SECURITY]#356
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/packagist-api-platform-core-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
api-platform/core (source) ^3.4.17^4.0.0 age confidence

API Platform Core vulnerable to cross-user attribute leak in JSON:API and HAL item normalizers due to missing isCacheKeySafe gate

CVE-2026-49858 / GHSA-pjhx-3c3w-9v23

More information

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.

Severity

  • CVSS Score: 5.9 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

api-platform/core (api-platform/core)

v4.1.29

Compare Source

Bug fixes
  • 9f5d0e020 fix(serializer): gate cache_key in JsonApi and Hal with isCacheKeySafe
  • 3812a3617 fix(serializer): adapt tests for 4.1 (createMock for HAL, drop name converter)
  • 8f32ad0e3 fix(serializer): bump min serializer dep and fix phpstan probe typing
  • 89ca6f279 fix(state): _api_operation_nme to _api_operation_name in ErrorProvider (#​7637)

v4.1.28

Compare Source

Bug fixes
  • dfe42b385 fix(symfony): skip argument resolver when context is not api platform

v4.1.27

Compare Source

Bug fixes

v4.1.26

Compare Source

Bug fixes

v4.1.25

Compare Source

Bug fixes

v4.1.24

Compare Source

Bug fixes
Features

Laravel compatibility with api-platform/http-cache:

v4.1.23

Compare Source

Bug fixes

v4.1.22

Compare Source

Bug fixes

v4.1.21

Compare Source

Bug fixes
  • 04414e4fc fix(serializer): improve #​7270 by reducing inconsistencies (#​7346)
  • 2e6911c35 fix(openapi): sync typehints between properties and getter/canner for alllowReserved and allowEmptyValue (#​7322)
  • 385953a92 fix(jsonapi): handle type error when handling validation errors (#​7330)
  • 4f717c1e1 fix(openapi): allow null on allowReserved and allowEmptyValue properties (#​7315)
  • c46c57918 fix(doctrine): do not consider empty string as a current date (#​7291)
  • d1073bc67 fix(laravel): read property type before serialization (#​7332)
  • d1abfc0fa fix(openapi): nullable default values in operation openapi definition (#​7321)
  • e7502b65a fix(serializer): nested denormalization when allow_extra_attributes=false (#​7270)
Features

v4.1.20

Compare Source

Bug fixes

v4.1.19

Compare Source

Bug fixes

v4.1.18

Compare Source

Bug fixes
Experimental Features
  • 8885000db feat(state): cast parameter values to validate with the Type constraint (#​7240)

v4.1.17

Compare Source

Bug fixes

v4.1.16

Compare Source

Bug fixes

Notes:

Two providers are now available on parameters (query parameters, header and uri variables Link):

  • ReadLinkParameterProvider previously used for link security (renamed from Symfony\Security\State\LinkedReadProvider)
  • IriConverterParameterProvider this allows you to read a resource from an IRI usefull for filters (eg ?author=/authors/1)

Previous tests on link security were left untouched we removed the experimental class Symfony\Security\State\LinkAccessCheckerProvider as well as the LinkedReadProvider as they're not used anymore.

v4.1.15

Compare Source

There was an issue with the subtree split as we attempted to test lower dependencies on the subtree split, some components where wrongly tagged.

The proper fix is at: #​7196

Bug fixes
Features

v4.1.14

Compare Source

There was an issue with the subtree split as we attempted to test lower dependencies on the subtree split, some components where wrongly tagged.

The proper fix is at: #​7196

Bug fixes
Features

v4.1.12

Compare Source

Bug fixes
  • b14a463a9 fix(laravel): register error handler without graphql

v4.1.11

Compare Source

Bug fixes
  • b14a463a9 fix(laravel): register error handler without graphql

v4.1.10

Compare Source

Bug fixes
  • 329acf21e fix(metadata): infer parameter string type from schema (#​7161)
  • 5459ba375 fix(metadata): parameter cast to array flag (#​7160)
  • fe73002bf fix(laravel): duplicated property names
  • b0390080e fix(laravel): name convert validation property path
  • 730d17a30 fix(laravel): validate the model instead of body
  • 4d66f5ef3 fix(laravel): persist embeded relations with groups
  • 39123942a fix(laravel): register error handler without graphql
  • fd010ea1b fix(openapi): nullable externalDocs return type
  • 470c2e8bd fix(httpcache): iri cache tag for collection operation with path parameter
  • 9c0dbb653 fix(state): do not expose FQCN in DeserializeProvider on PartialDenormalizationException (#​7158)
  • f78986000 fix(serializer): exception message to not expose resource FQCN (#​7156)
Features
  • 767fa926b feat(laravel): add name_converter option

v4.1.9

Compare Source

Bug fixes

v4.1.8

Compare Source

Bug fixes
  • 0cd9b9f70 fix: backport handling of union/intersection type in item normalizer (#​7106)
  • 0fc0904b9 fix(metadata): correct class to exclude defaults (#​7088)
  • 5145a8383 fix: filtering not using strategy set in attribute when strategy not set per property (#​7136)
  • 613bb5b75 fix(doctrine): filters schema for dates and numbers (#​7131)
  • ed1ef2594 fix(state): specify :property parameter properties (#​7110)
  • f55606b01 fix(serializer): throw NotNormalizableValueException when resource not found or invalid IRI on denormalization
  • 3faf5d4b4 fix(doctrine): order filter instance service
  • 0ff950f37 fix: type info deprecations to baseline
  • d93d580a1 fix: command name deprecation

v4.1.7

Compare Source

Bug fixes

v4.1.6

Compare Source

Bug fixes
  • 44e560839 fix(laravel): undefined variable app

v4.1.5

Compare Source

Bug fixes

v4.1.4

Compare Source

Bug fixes

v4.1.3

Compare Source

Bug fixes

v4.1.2

Compare Source

Bug fixes
  • 9f5d0e020 fix(serializer): gate cache_key in JsonApi and Hal with isCacheKeySafe
  • 3812a3617 fix(serializer): adapt tests for 4.1 (createMock for HAL, drop name converter)
  • 8f32ad0e3 fix(serializer): bump min serializer dep and fix phpstan probe typing
  • 89ca6f279 fix(state): _api_operation_nme to _api_operation_name in ErrorProvider (#​7637)

v4.1.1

Compare Source

Bug fixes

v4.1.0

Compare Source

Bug fixes
Features

v4.0.22

Compare Source

Bug fixes

v4.0.21

Compare Source

Bug fixes
Features

v4.0.20

Compare Source

Bug fixes
  • 284937039 fix(doctrine): mapping ArrayAccess deprecation (#​6982)
  • a434173b8 fix(doctrine): Add a proper exception when a doctrine manager could not be found for a resource class (#​6995)
Features

v4.0.19

Compare Source

Bug fixes

Compatibility with Laravel 12.

v4.0.18

Compare Source

Bug fixes
Features

v4.0.17

Compare Source

Bug fixes

To save some time during cache warmup we recommend to define uri variables such as: uriVariables: ['id']. More details at #​6954.

Features

v4.0.16

Compare Source

Bug fixes
  • dc4fc84ba fix(graphql): securityAfterResolver not called
Features

v4.0.15

Compare Source

Bug fixes
  • 36cee399c fix(state): skip Content-Location header for GET requests (#​6901)
  • dba9de197 fix(symfony): fix property restrictions for root resource with dynamic validation groups (#​6908)
Features

Also contains v3.4.15 changes.

v4.0.14

Compare Source

Bug fixes
  • 97cdb6b3f fix(state): remove ProcessorInterface laravel specific type
  • b12a0d005 fix(graphql): register types for parameter args (#​6895)

Also contains v3.4.14 changes.

v4.0.13

Compare Source

Bug fixes

Also contains v3.4.10 changes.

v4.0.12

Compare Source

Bug fixes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/packagist-api-platform-core-vulnerability branch from cd2a807 to 4c18add Compare July 11, 2026 10:46
@renovate
renovate Bot force-pushed the renovate/packagist-api-platform-core-vulnerability branch from 4c18add to b60a242 Compare July 11, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants