Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-88359 Overview
CVE-2026-88359 is a stack exhaustion vulnerability in libfyaml 0.9.6, a C-based YAML parser library. The flaw resides in the fy_atom_iter_format() function within src/lib/fy-atom.c. When the parser processes a crafted YAML document containing a very large literal or folded block scalar, the function repeatedly grows an internal buffer using alloca() inside a loop. Because alloca()-backed memory is only reclaimed when the enclosing function returns, cumulative stack growth exceeds the process stack limit and triggers SIGSEGV, causing a denial of service. The weakness is classified as [CWE-770] Allocation of Resources Without Limits or Throttling.
Critical Impact
An attacker who can supply YAML input to an application linked against libfyaml 0.9.6 can crash the process by submitting a block scalar with many empty lines, resulting in service disruption.
Affected Products
- libfyaml 0.9.6
- Applications and services statically or dynamically linked against vulnerable libfyaml builds
- Downstream parsers and tooling that process untrusted YAML input through libfyaml
Discovery Timeline
- 2026-09-24 - CVE-2026-88359 published to the National Vulnerability Database (NVD)
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-88359
Vulnerability Analysis
The vulnerability occurs during YAML atom iteration and formatting in libfyaml. The fy_atom_iter_format() routine tracks pending line breaks encountered while emitting a block scalar. For each additional pending line break beyond the current buffer capacity, the function invokes alloca() to grow an auxiliary buffer that stores line-break state. Memory obtained from alloca() is allocated on the stack frame of the caller and is not freed until that frame unwinds. Because the growth happens inside a loop that iterates over every empty line in the scalar, a document with thousands or millions of blank lines produces unbounded stack consumption within a single invocation.
Root Cause
The root cause is the use of alloca() inside an iteration construct without a release boundary. The code pattern grows pending_lb across loop iterations by repeatedly stack-allocating a larger buffer and copying prior contents, with no reuse of previously allocated space. Combined with the absence of an input-size bound on block scalar line counts, this produces a resource-management flaw aligned with [CWE-770].
Attack Vector
Exploitation requires an application that parses attacker-controlled YAML through libfyaml 0.9.6. A remote attacker crafts a YAML document containing a literal (|) or folded (>) block scalar made up of a very large number of empty lines. When the vulnerable parser formats the atom, the loop drives stack usage past the process limit and the process receives SIGSEGV. No authentication is required, but the attack depends on the target application accepting and parsing the supplied YAML.
// Patch excerpt from src/lib/fy-atom.c (type: patch)
int value, code_length, ret;
uint8_t code[4], *tt;
int j, pending_nl;
+ int pending_lb_inplace[16];
int *pending_lb = NULL, *pending_lb_new = NULL;
+ int *pending_lb_alloc = NULL;
int pending_lb_size = 0;
enum fy_utf8_escape esc_mode;
size_t rlen, i;
The fix introduces a small fixed-size inline buffer (pending_lb_inplace[16]) for the common case and a separately tracked heap allocation (pending_lb_alloc) for larger counts, removing the unbounded stack growth pattern. Source: GitHub Commit 20502068 and GitHub Commit 93741a7c.
Detection Methods for CVE-2026-88359
Indicators of Compromise
- Repeated SIGSEGV crashes in processes that call into libfyaml, especially during YAML parsing workloads.
- Core dumps whose stack traces terminate inside fy_atom_iter_format() in src/lib/fy-atom.c.
- Inbound YAML payloads containing block scalars with abnormally large numbers of empty lines.
Detection Strategies
- Inventory all applications and container images that bundle libfyaml 0.9.6 using software composition analysis.
- Instrument YAML ingestion endpoints to log payload size and line counts, flagging documents that exceed baseline norms.
- Add fuzz-testing coverage for YAML parsers using long block-scalar inputs to surface similar resource-exhaustion defects pre-production.
Monitoring Recommendations
- Monitor service health signals for repeated restarts of YAML-processing workers and correlate with request payloads.
- Alert on SIGSEGV termination events for user-space services that accept external configuration or data files.
- Track inbound request sizes to parsing APIs and threshold-alert on anomalous spikes consistent with denial-of-service probing.
How to Mitigate CVE-2026-88359
Immediate Actions Required
- Upgrade libfyaml to a version that includes commits 20502068 and 93741a7c, which replace the unbounded alloca() growth with a bounded inline buffer plus heap fallback.
- Rebuild and redeploy any statically linked binaries and container images after the library upgrade.
- Enforce input size limits on YAML documents at the application or gateway layer until patched libraries are in production.
Patch Information
The maintainer addressed the issue in two upstream commits to src/lib/fy-atom.c: GitHub Commit 20502068 and GitHub Commit 93741a7c. Background and reproduction details are tracked in GitHub Issue #315. Downstream distributions should rebase against a release that incorporates both commits.
Workarounds
- Reject YAML inputs above a conservative size threshold at the ingress layer before they reach the parser.
- Pre-scan incoming documents and drop payloads whose block scalars contain more empty lines than the application legitimately requires.
- Run YAML parsing in isolated worker processes with constrained stack and memory limits so a crash does not disrupt the primary service.
# Example: cap request body size for a YAML ingestion endpoint (nginx)
client_max_body_size 256k;
# Example: constrain stack size for a YAML-parsing worker (systemd unit)
# /etc/systemd/system/yaml-worker.service.d/limits.conf
[Service]
LimitSTACK=8M
LimitAS=512M
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

