MediumGHSA-hqp2-7rr8-hf26CVE-2026-122053

Symfony: ObjectNormalizer Dotted-Key Property-Path Traversal Bypasses #[Ignore] on Nested Objects

Published 1 Dec 2026 · Updated 1 Dec 2026

Affected packages

Affected
<5.4.56
Fixed in
5.4.56
Update to the fixed version for your release line, for example:composer require symfony/serializer:^5.4.56
Affected
>=6.4.9 <6.4.50
Fixed in
6.4.50
Update to the fixed version for your release line, for example:composer require symfony/serializer:^6.4.50
Affected
>=7.0.9 <7.1.0
Fixed in
7.1.0
Update to the fixed version for your release line, for example:composer require symfony/serializer:^7.1.0
Affected
>=7.1.2 <7.4.23
Fixed in
7.4.23
Update to the fixed version for your release line, for example:composer require symfony/serializer:^7.4.23
Affected
>=8.0.0 <8.1.11
Fixed in
8.1.11
Update to the fixed version for your release line, for example:composer require symfony/serializer:^8.1.11
Affected
<5.4.56
Fixed in
5.4.56
Update to the fixed version for your release line, for example:composer require symfony/symfony:^5.4.56
Affected
>=6.4.9 <6.4.50
Fixed in
6.4.50
Update to the fixed version for your release line, for example:composer require symfony/symfony:^6.4.50
Affected
>=7.0.9 <7.1.0
Fixed in
7.1.0
Update to the fixed version for your release line, for example:composer require symfony/symfony:^7.1.0
Affected
>=7.1.2 <7.4.23
Fixed in
7.4.23
Update to the fixed version for your release line, for example:composer require symfony/symfony:^7.4.23
Affected
>=8.0.0 <8.1.11
Fixed in
8.1.11
Update to the fixed version for your release line, for example:composer require symfony/symfony:^8.1.11

We confirm your address first. See our privacy policy.

Which symfony/serializer does your project really install?

Drop your composer.lock hereWe find the exact symfony/serializer version you install, even when another package pulls it in, and tell you if it’s affected and what to run. Free, no sign-up.

Works for private projects: the file is read in memory to run the scan and then dropped. Also reads composer.json.

Public repo?

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Details

Description

ObjectNormalizer::isAllowedAttribute() treats any attribute name containing . (and, from 6.4, [) as writable, and setAttributeValue() hands the name straight to PropertyAccessor::setValue(), which parses it as a property path and traverses into the nested object.

A payload key such as customer.admin therefore writes to $order->customer->admin, bypassing the #[Ignore] metadata of the nested class. That metadata is only consulted when the nested object is denormalized in its own right, never when it is reached through a path. #[Groups] restrictions are not bypassed: the path is only accepted when no groups are passed in the context, and then groups restrict nothing.

No allowlist stands in the way. When the root class carries no #[Ignore] and no #[Groups], AbstractNormalizer::getAllowedAttributes() returns false and every key in the payload is let through:

{"customer": {"name": "Mallory"}, "qty": 1, "customer.admin": true}

The first key denormalizes customer normally, honouring #[Ignore] on admin. The third key takes the path fast lane and sets admin anyway.

Applications that bind untrusted input to objects are affected, including controllers using #[MapRequestPayload] or #[MapQueryString], whose default normalizer is ObjectNormalizer. With OBJECT_TO_POPULATE, as used for partial updates, the traversal reaches an already hydrated entity graph and the modified field may be persisted.

Because PropertyAccessor resolves a path segment against public methods as well as properties, a segment matching a public method name invokes that method with the attacker's value.

The path support itself is deliberate: class metadata may declare an attribute whose name is a property path and expose it under a serialized_name. Only paths that no mapping ever declared are a problem.

Resolution

A property path is accepted only when the class metadata declares an attribute of that exact name. Declared paths keep working unchanged; a path arriving in the payload with no matching declaration is ignored.

On 6.4 and above the check is placed before the static writability cache is consulted. That cache is keyed on class, attribute and extraction context only, so caching a metadata-dependent answer would let one normalizer answer for another and could restore the bypass.

The patches for this issue are available here for branch 5.4 and here for branch 6.4 (and forward-ported to 7.4, 8.1 and 8.2).

Credits

Symfony would like to thank Alexandre Daubois and The PHP Foundation for reporting the issue.

Is GHSA-hqp2-7rr8-hf26 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/serializer, and gives you the command that fixes it.

More advisories for symfony/serializer

  • HighCVE-2026-118515Symfony: The Serializer Builds UploadedFile Objects From Request Data, Letting a Client Point an Upload at Any Server File · 1 Dec 2026
  • CriticalGHSA-j68w-pg49-f6vxSymfony XML decoding attack vector through external entities · 30 May 2024
  • MediumCVE-2021-41270CSV Injection in symfony/serializer · 24 Nov 2021
symfony/serializer security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.