CVE-2026-109413: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process

Published Aug 30, 2026
·
Updated

Description

Yaml\Parser::lexInlineStructure() recursed through lexInlineMapping() and lexInlineSequence() for every { and [ of an inline collection, without entering the nesting level that the rest of the parser bounds with maxNestingLevel. A document made of deeply nested inline collections, such as [[[[...]]]], exhausted the stack while it was being lexed: depending on the PHP version and its stack settings, the process crashed or the request ended with a fatal error.

Any code parsing untrusted YAML is affected. That includes #[MapRequestPayload] when the Yaml component is installed and the endpoint does not restrict acceptFormat: a single unauthenticated request with a YAML content type is enough.

Resolution

The inline lexer now enters and leaves the same nesting level as the rest of the parser, so nested inline collections are bounded by maxNestingLevel, and the parser raises a ParseException beyond it.

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

Credits

We would like to thank Nicolas Grekas for reporting the issue and providing the fix.

References

- Fix: #65688

Other sources

CVE-2026-109413: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process

— Packagist

In Symfony YAML prior to versions 5.4.54, 6.4.45, 7.4.18, and 8.1.6, Yaml\Parser::lexInlineStructure() recursed through lexInlineMapping() and lexInlineSequence() for every { and [ of an inline collection, without entering the nesting level that the rest of the parser bounds with maxNestingLevel. A document made of deeply nested inline collections, such as [[[[...]]]], exhausted the stack while it was being lexed: depending on the PHP version and its stack settings, the process crashed or the request ended with a fatal error. Any code parsing untrusted YAML is affected. That includes #[MapRequestPayload] when the Yaml component is installed and the endpoint does not restrict acceptFormat: a single unauthenticated request with a YAML content type is enough. This issue affects symfony/yaml through v5.4.53, v6.0.0-BETA1 through v6.4.44, v7.0.0-BETA1 through v7.4.17, and v8.0.0-BETA1 through v8.1.5.

— Ubuntu

Affected Software

58 affected componentsFixes available
composer/symfony/yaml<=5.4.53, >=6.0.0-BETA1<=6.4.44, >=7.0.0-BETA1<=7.4.17, >=8.0.0-BETA1<=8.1.5
composer/symfony/yaml>=8.0.0<8.1.6
8.1.6
composer/symfony/yaml>=7.0.0<7.4.18
7.4.18
composer/symfony/yaml>=6.0.0<6.4.45
6.4.45
composer/symfony/yaml>=2.0.0<5.4.54
5.4.54
composer/symfony/symfony>=8.0.0<8.1.6
8.1.6
composer/symfony/symfony>=7.0.0<7.4.18
7.4.18
composer/symfony/symfony>=6.0.0<6.4.45
6.4.45
composer/symfony/symfony>=2.0.0<5.4.54
5.4.54
composer/symfony/symfony>=2.0.0, <3.0.0
composer/symfony/symfony>=3.0.0, <4.0.0
composer/symfony/symfony>=4.0.0, <5.0.0
composer/symfony/symfony>=5.0.0, <5.1.0
composer/symfony/symfony>=5.1.0, <5.2.0
composer/symfony/symfony>=5.2.0, <5.3.0
composer/symfony/symfony>=5.3.0, <5.4.0
composer/symfony/symfony>=5.4.0, <5.4.54
5.4.54
composer/symfony/symfony>=6.0.0, <6.1.0
composer/symfony/symfony>=6.1.0, <6.2.0
composer/symfony/symfony>=6.2.0, <6.3.0
composer/symfony/symfony>=6.3.0, <6.4.0
composer/symfony/symfony>=6.4.0, <6.4.45
6.4.45
composer/symfony/symfony>=7.0.0, <7.1.0
composer/symfony/symfony>=7.1.0, <7.2.0
composer/symfony/symfony>=7.3.0, <7.4.0
composer/symfony/symfony>=7.4.0, <7.4.18
7.4.18
composer/symfony/symfony>=8.0.0, <8.1.0
composer/symfony/symfony>=8.1.0, <8.1.6
8.1.6
composer/symfony/yaml>=2.0.0, <3.0.0
composer/symfony/yaml>=3.0.0, <4.0.0
composer/symfony/yaml>=4.0.0, <5.0.0
composer/symfony/yaml>=5.0.0, <5.1.0
composer/symfony/yaml>=5.1.0, <5.2.0
composer/symfony/yaml>=5.2.0, <5.3.0
composer/symfony/yaml>=5.3.0, <5.4.0
composer/symfony/yaml>=5.4.0, <5.4.54
5.4.54
composer/symfony/yaml>=6.0.0, <6.1.0
composer/symfony/yaml>=6.1.0, <6.2.0
composer/symfony/yaml>=6.2.0, <6.3.0
composer/symfony/yaml>=6.3.0, <6.4.0
composer/symfony/yaml>=6.4.0, <6.4.45
6.4.45
composer/symfony/yaml>=7.0.0, <7.1.0
composer/symfony/yaml>=7.1.0, <7.2.0
composer/symfony/yaml>=7.3.0, <7.4.0
composer/symfony/yaml>=7.4.0, <7.4.18
7.4.18
composer/symfony/yaml>=8.0.0, <8.1.0
composer/symfony/yaml>=8.1.0, <8.1.6
8.1.6
ubuntu/symfony*
ubuntu/symfony*
ubuntu/symfony*
ubuntu/symfony*
ubuntu/symfony*
ubuntu/symfony*
ubuntu/symfony*
debian/symfony*
debian/symfony<6.4.49+dfsg-0+deb13u1
6.4.49+dfsg-0+deb13u1
debian/symfony<7.4.18+dfsg-1
7.4.18+dfsg-1
debian/symfony<=5.4.53+dfsg-0+deb12u1, <=6.4.41+dfsg-0+deb13u1
6.4.49+dfsg-0+deb13u17.4.22+dfsg-17.4.23+dfsg-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/yaml to a version that resolves this vulnerability.

    Fixed in 8.1.6
  2. Upgrade

    Upgrade composer/symfony/yaml to a version that resolves this vulnerability.

    Fixed in 7.4.18
  3. Upgrade

    Upgrade composer/symfony/yaml to a version that resolves this vulnerability.

    Fixed in 6.4.45
  4. Upgrade

    Upgrade composer/symfony/yaml to a version that resolves this vulnerability.

    Fixed in 5.4.54
  5. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 8.1.6
  6. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 7.4.18
  7. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.45
  8. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 5.4.54
  9. Upgrade

    Upgrade debian/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.49+dfsg-0+deb13u1
  10. Upgrade

    Upgrade debian/symfony to a version that resolves this vulnerability.

    Fixed in 7.4.18+dfsg-1
  11. Upgrade

    Upgrade debian/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.49+dfsg-0+deb13u1Fixed in 7.4.22+dfsg-1Fixed in 7.4.23+dfsg-1
  12. Upgrade

    Upgrade symfony/yaml to a version that resolves this vulnerability.

    Fixed in 5.4.54
  13. Upgrade

    Upgrade symfony/yaml to a version that resolves this vulnerability.

    Fixed in 6.4.45
  14. Upgrade

    Upgrade symfony/yaml to a version that resolves this vulnerability.

    Fixed in 7.4.18
  15. Upgrade

    Upgrade symfony/yaml to a version that resolves this vulnerability.

    Fixed in 8.1.6

Event History

Aug 30, 2026
Advisory Published
via Packagist·08:00 AM
Data Sourced
via Packagist·08:00 AM
DescriptionSeverityAffected Software
Oct 15, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionWeakness
Data Sourced
via OSV·03:17 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness
Oct 27, 2026
Advisory Published
via GitHub·07:01 PM
Data Sourced
via GitHub·07:01 PM
DescriptionWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Which applications are realistically exposed to unauthenticated requests?

Applications that parse untrusted YAML are affected. In particular, an endpoint using #[MapRequestPayload] is exposed to a single unauthenticated YAML request when the Yaml component is installed and the endpoint does not restrict acceptFormat.

2

What does an attacker need to trigger the issue?

The attacker needs to supply a YAML document containing deeply nested inline collections, such as repeated nested square brackets. No authentication is required for exposed #[MapRequestPayload] endpoints that accept YAML.

3

Are all Symfony YAML parser versions affected?

Affected versions are symfony/yaml before 5.4.54, before 6.4.45 in the 6.x line, before 7.4.18 in the 7.x line, and before 8.1.6 in the 8.x line. The issue also affects versions beginning with 6.0.0-BETA1, 7.0.0-BETA1, and 8.0.0-BETA1 until their respective fixed releases.

4

What can be done if the component cannot be updated immediately?

Prevent untrusted YAML from reaching the parser. For #[MapRequestPayload] endpoints, restrict acceptFormat so YAML content types are not accepted.

5

How does the impact present at runtime?

Parsing a sufficiently deeply nested inline YAML collection can exhaust the PHP stack during lexing. Depending on the PHP version and stack settings, this crashes the process or terminates the request with a fatal error.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203