Description
rapidyaml through 0.16.0 contains an out-of-bounds write vulnerability in ParseEngine::_add_annotation() that allows attackers to corrupt memory by supplying YAML with excess anchors or tags. Attackers can submit YAML with consecutive anchors or tags to overflow the fixed two-element annotation array in release builds, corrupting stack memory and crashing the process.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| biojppm | rapidyaml | ≤ 0.16.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | rapidyaml | No fix yet | — |
| Ubuntu 26.04 LTS | rapidyaml | No fix yet | — |
References
- https://github.com/biojppm/rapidyaml/issues/680 issue-tracking
- https://github.com/biojppm/rapidyaml/blob/v0.16.0/src/c4/yml/parse_engine.def.hpp#L4307-L4351 technical-description
- https://github.com/biojppm/rapidyaml/blob/v0.16.0/src/c4/yml/parse_engine.def.hpp#L5524-L5535 technical-description
- https://github.com/biojppm/rapidyaml/blob/v0.16.0/src/c4/yml/parse_engine.hpp#L249-L260 technical-description
- rapidyaml v0.16.0 Release Notes release-notes
- https://hackmd.io/@haindpwn/rapidyaml-parser-annotation-oob-write technical-description
- VulnCheck Advisory: rapidyaml through 0.16.0 Out-of-Bounds Write via ParseEngine::_add_annotation() third-party-advisory