Skip to content

[Yaml] Add notes about unsafe PARSE_* flags for yaml#22140

Merged
javiereguiluz merged 1 commit intosymfony:6.4from
nicolas-grekas:yaml-note
Mar 10, 2026
Merged

[Yaml] Add notes about unsafe PARSE_* flags for yaml#22140
javiereguiluz merged 1 commit intosymfony:6.4from
nicolas-grekas:yaml-note

Conversation

@nicolas-grekas
Copy link
Member

Parsing ``!php/object`` tags uses PHP deserialization internally. Never
enable ``PARSE_OBJECT`` for untrusted YAML contents.

and

Enabling ``PARSE_CONSTANT`` allows YAML contents to resolve arbitrary PHP
constants and enum cases. Only enable it for trusted input.

@nicolas-grekas nicolas-grekas requested a review from xabbuh as a code owner March 10, 2026 09:29
@carsonbot carsonbot added this to the 6.4 milestone Mar 10, 2026
@carsonbot carsonbot changed the title Add notes about unsafe PARSE_* flags for yaml Add notes about unsafe PARSE_* flags for yaml Mar 10, 2026
@carsonbot carsonbot changed the title Add notes about unsafe PARSE_* flags for yaml [Yaml] Add notes about unsafe PARSE_* flags for yaml Mar 10, 2026
@javiereguiluz
Copy link
Member

These are important tips. Thanks Nicolas!

@javiereguiluz javiereguiluz merged commit 4889615 into symfony:6.4 Mar 10, 2026
3 checks passed
@nicolas-grekas nicolas-grekas deleted the yaml-note branch March 10, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants