Skip to main content

PyYAML CVE-2026-142207

| EUVDEUVD-2026-141623 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-12-02 VulnCheck GHSA-q489-h3j7-j39m
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit YAML with long base-60 scalar
  2. Exploit
    Resolver matches sexagesimal int pattern
  3. Execution
    construct_yaml_int runs quadratic-time
  4. Impact
    Exhaust CPU and block parsing thread

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that the target application pass attacker-controlled YAML to one of the affected loaders - safe_load, SafeLoader, CSafeLoader or FullLoader - which are the common 'safe' entry points, so default usage is affected rather than a rare configuration. The specific trigger is a scalar containing many colon-separated groups that the resolver classifies as a base-60 integer, invoking the quadratic path in SafeConstructor.construct_yaml_int(). Limiting factors: the application must actually accept and parse untrusted YAML (not merely emit it); impact is confined to availability (CPU/thread exhaustion of the parsing worker) with no confidentiality or integrity effect; and severity in practice depends on whether parsing runs synchronously on a request-handling thread without timeouts or input-size limits.

Impact

This is a medium-severity algorithmic-complexity DoS (CWE-407), not a high-impact priority. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes remote, unauthenticated, low-complexity reachability, but the only impact metric set is VA:L - a partial availability effect with no confidentiality or integrity impact (VC:N/VI:N) and no scope/subsequent-system change. The realistic worst case is CPU exhaustion that blocks the parsing thread, not code execution or data disclosure, which is why the 6.9 score lands in the medium band and the vuln.today decision label is 'this_month' rather than act_now/emergency. No EPSS score is provided, the CVE is not listed in CISA KEV, and no working exploit is supplied, so there is no signal of active or widespread exploitation - exploitation status is best read as latent given how trivially the trigger (a long colon-separated scalar) can be crafted. The dominant risk driver here is reach, not severity: PyYAML is parsed almost everywhere in the Python ecosystem, so exposure depends entirely on whether a given application feeds untrusted YAML to an affected loader. Missing data to note: no EPSS, no KEV, no SSVC automatable/technical-impact breakdown, and no fixed version is stated in the provided evidence.

Exploit ScenarioDerived

An attacker submits a YAML document to any application endpoint that parses untrusted input with safe_load, SafeLoader, CSafeLoader or FullLoader, including a scalar made of many colon-separated groups that PyYAML's resolver treats as a base-60 (sexagesimal) integer. SafeConstructor.construct_yaml_int() then performs quadratic-time construction on that scalar, saturating a CPU core and blocking the parsing thread. No public exploit is identified at time of analysis, though the malicious input is simple to construct from the advisory description.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

YAML parsing in PyYAML through 6.0.4 can burn unbounded CPU when a document supplied to safe_load, SafeLoader, CSafeLoader or FullLoader contains a scalar with many colon-separated groups that the resolver classifies as a base-60 (sexagesimal) integer. Because these are the library's ordinary 'safe' entry points, applications that parse untrusted YAML in default configuration are the affected population, and the parsing worker thread is blocked for a quadratically growing amount of time - an availability-only algorithmic-complexity flaw (CWE-407) with no confidentiality or integrity impact. The practical risk is medium and conditional: it matters where parsing happens synchronously on a request-handling path without input-size limits or timeouts, and the decision signal places it in the this-month remediation window rather than the emergency queue; no public exploit code was identified at time of analysis.

RemediationAI

No vendor-released patch was identified at time of analysis: the available references are the vulnerable source locations in 6.0.4 (resolver.py#L185-L192 and constructor.py#L240-L267) plus the VulnCheck advisory (https://www.vulncheck.com/advisories/pyyaml-through-6.0.4-cpu-denial-of-service-via-sexagesimal-integer-construction), and neither they nor the EUVD record name a fixed version, so confirm patched status upstream before relying on an upgrade alone. Until a fix is confirmed, the effective controls are at the boundary where YAML enters the process: cap the size of accepted YAML documents (for example a hard byte limit on uploads and request bodies) and reject or truncate scalars containing long runs of colon-separated groups before the document reaches safe_load, SafeLoader, CSafeLoader or FullLoader - the trade-off is that legitimately large documents and legitimate base-60 literals, which are rare in practice, will be refused. Additionally, run YAML parsing in a separate worker or subprocess pool with a wall-clock timeout so a slow parse cannot pin a request-handling thread; the trade-off is added latency and process overhead for every parse, and timed-out parses must be terminated rather than merely abandoned. Where untrusted YAML is not a hard requirement, prefer a non-YAML interchange format or a schema-validated subset of YAML; if the input source is trusted and authenticated, the exposure is largely eliminated without code changes. Because impact is availability-only, monitoring parse latency and thread-pool saturation gives early warning that the control is being exercised. Remediation is scheduled within the current month per the priority signal, not treated as an emergency.

Affected VersionsENISA

PyYAML 0 ≤6.0.4

Affected Packages

euvd pyyaml no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PyYAML resolves an untagged scalar to a native type before construction: the resolver in lib/yaml/resolver.py (lines 185-192 in 6.0.4) matches the sexagesimal pattern for base-60 integers, and lib/yaml/constructor.py (lines 240-267) then converts the value in SafeConstructor.construct_yaml_int(). That conversion is what scales super-linearly - the reported behaviour is quadratic time in the number of colon-separated groups, so a short, well-formed YAML document yields disproportionate parse cost. The root cause class is CWE-407, inefficient algorithmic complexity, not memory corruption: there is no overflow, no code execution and no data exposure, only CPU and thread occupancy. The affected surface is the standard safety-oriented loaders (safe_load, SafeLoader, FullLoader and the libyaml-backed CSafeLoader), which are exactly what applications use when they deliberately parse third-party YAML, so exposure is a function of whether untrusted YAML reaches those entry points. Note that a libyaml-backed CSafeLoader still routes construction through the Python constructor layer, so switching loader implementation alone is not a documented fix in the available sources. The CVSS 4.0 base of 6.9 reflects network reachability with no privileges or user interaction and a low availability-only impact; the assessed CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) agrees on the availability-only scope and treats the attack complexity as low once untrusted YAML is accepted. The trigger requires the application to accept and parse attacker-supplied YAML, not merely emit it, and the severity depends on whether that parsing runs on a request-handling thread without timeouts or size limits.

Know when Pyyaml gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Remote unauthenticated parsing of untrusted YAML with a trivially crafted scalar gives AV:N/AC:L/PR:N/UI:N; impact is partial availability only (A:L), with no confidentiality or integrity effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

PyYAML through 6.0.4 contains a denial of service vulnerability in SafeConstructor.construct_yaml_int() that allows remote attackers to exhaust CPU by supplying unbounded base-60 integer scalars. Attackers can submit a YAML document with a scalar containing many colon-separated groups to safe_load, SafeLoader, CSafeLoader or FullLoader, causing quadratic-time construction that blocks the parsing thread.

Threat Intelligence Overview

Prevalence
Ubiquitous
PyYAML is the de facto YAML parser across the Python ecosystem
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy