When it denormalizes data into a class, the Serializer computes which attributes it may write from the #[Ignore] and #[Groups] metadata. It did that for the requested class, but wrote into another class in two cases. The first case is the class that a discriminator map picks from the data. The second is the class of the object passed with the object_to_populate or deep_object_to_populate option.
When the requested class has no #[Ignore] attribute and the context sets no groups, nothing was restricted. A client could then set a property that the picked class marks with #[Ignore], constructor arguments included:
#[DiscriminatorMap(typeProperty: 'kind', mapping: ['email' => EmailNotification::class])]
abstract class Notification {}
class EmailNotification extends Notification
{
#[Ignore]
public bool $skipModeration = false;
}
With a #[MapRequestPayload] Notification $notification argument, the payload {"kind":"email","skipModeration":true} set skipModeration. With groups in the context, a property outside these groups could be set too. This happened when another class of the map had a property with the same name in one of the groups. The same happened with #[Ignore] when the requested class declares the map itself. On 5.4, ObjectNormalizer also returned such properties when normalizing an object whose class declares the map itself.
This affects ObjectNormalizer, PropertyNormalizer and GetSetMethodNormalizer.
The Serializer now resolves the class it writes into first, and computes the allowed attributes for that class. The type property of a discriminator map is also written only when the metadata of that class allows it.
When the requested class has no #[Ignore] attribute and the context sets no groups, nothing was restricted. A client could then set a property that the picked class marks with #[Ignore], constructor arguments included:
#[DiscriminatorMap(typeProperty: 'kind', mapping: ['email' => EmailNotification::class])]
abstract class Notification {}
class EmailNotification extends Notification
{
#[Ignore]
public bool $skipModeration = false;
}
With a #[MapRequestPayload] Notification $notification argument, the payload {"kind":"email","skipModeration":true} set skipModeration. With groups in the context, a property outside these groups could be set too. This happened when another class of the map had a property with the same name in one of the groups. The same happened with #[Ignore] when the requested class declares the map itself. On 5.4, ObjectNormalizer also returned such properties when normalizing an object whose class declares the map itself.
This affects ObjectNormalizer, PropertyNormalizer and GetSetMethodNormalizer.
The Serializer now resolves the class it writes into first, and computes the allowed attributes for that class. The type property of a discriminator map is also written only when the metadata of that class allows it.
Project Subscriptions
No data.
Advisories
No advisories yet.
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Wed, 25 Nov 2026 10:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | When it denormalizes data into a class, the Serializer computes which attributes it may write from the #[Ignore] and #[Groups] metadata. It did that for the requested class, but wrote into another class in two cases. The first case is the class that a discriminator map picks from the data. The second is the class of the object passed with the object_to_populate or deep_object_to_populate option. When the requested class has no #[Ignore] attribute and the context sets no groups, nothing was restricted. A client could then set a property that the picked class marks with #[Ignore], constructor arguments included: #[DiscriminatorMap(typeProperty: 'kind', mapping: ['email' => EmailNotification::class])] abstract class Notification {} class EmailNotification extends Notification { #[Ignore] public bool $skipModeration = false; } With a #[MapRequestPayload] Notification $notification argument, the payload {"kind":"email","skipModeration":true} set skipModeration. With groups in the context, a property outside these groups could be set too. This happened when another class of the map had a property with the same name in one of the groups. The same happened with #[Ignore] when the requested class declares the map itself. On 5.4, ObjectNormalizer also returned such properties when normalizing an object whose class declares the map itself. This affects ObjectNormalizer, PropertyNormalizer and GetSetMethodNormalizer. The Serializer now resolves the class it writes into first, and computes the allowed attributes for that class. The type property of a discriminator map is also written only when the metadata of that class allows it. | |
| Title | The Serializer Doesn't Enforce #[Ignore] on the Class Picked by a Discriminator Map or object_to_populate | |
| Weaknesses | CWE-915 | |
| References |
| |
| Metrics |
cvssV4_0
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: Symfony
Published:
Updated: 2026-11-25T10:00:12.261Z
Reserved: 2026-11-20T14:01:43.157Z
Link: CVE-2026-133752
No data.
Status : Received
Published: 2026-11-25T10:17:12.660
Modified: 2026-11-25T10:17:12.660
Link: CVE-2026-133752
No data.
OpenCVE Enrichment
Updated: 2026-11-25T12:00:09Z
Weaknesses