Skip to main content

libyang CVE-2026-136908

| EUVDEUVD-2026-135437 HIGH
Free of Pointer not at Start of Buffer (CWE-761)
2026-11-25 VulnCheck GHSA-crrx-r3x8-rp53
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted YANG data to in-memory parser
  2. Delivery
    Parser advances read position past buffer start
  3. Exploit
    ly_in_memory returns interior heap pointer
  4. Execution
    Application calls free() on interior address
  5. Impact
    Allocator aborts process, denial of service

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Exploitation requires an application that (1) uses libyang's in-memory input interface ly_in_memory() or ly_in_memory_chunk(), (2) reads some data so the internal cursor (in->current) advances past in->start, and (3) subsequently calls free() on the pointer returned by those functions, which then points into the interior of the heap allocation. The attacker's lever is supplying YANG data parsed from a heap buffer. Limiting factors: the bug is only reachable in applications that free the returned pointer (libyang itself does not necessarily do so in all paths), the sole impact is process abort (no code execution, no data disclosure), and CVSS marks AC:H with AT:P indicating a non-trivial attack requirement whose exact nature is not described in the available sources. Affected versions: libyang through 6.4.13; fixed by CESNET PR #2641 / commit 76c8009e.

Impact

This is a genuine but bounded issue, best characterized as moderate priority rather than an emergency. The vulnerability (CWE-761, free of a pointer not at the start of a buffer) is confirmed by the vendor source diff: ly_in_memory() and ly_in_memory_chunk() return in->current (the advanced read position) instead of in->start, so a caller that frees the returned pointer after any data has been read passes an interior heap address to free(), aborting the process. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 8.2, but the only impact metric set is VA:H - confidentiality and integrity are explicitly N - so despite the 'Information Disclosure' tag the real-world effect is availability loss (denial of service via process abort), not data exposure; that tag conflicts with the vector and should be treated as mislabeled. The high score is driven largely by AV:N, while AC:H and AT:P temper it; the sources do not explain WHY the attack complexity and attack-requirement metrics are elevated, so the precise trigger difficulty is not described in the available evidence. KEV status is NO (not in CISA KEV), EPSS is not provided in the input, and no working public exploit is referenced - only a vendor patch and a VulnCheck advisory. The vuln.today decision label is 'this_week', consistent with a patch-available, non-actively-exploited availability flaw. Net: a real bug worth patching on a normal cycle, not a drop-everything event, with the caveat that exploitability depends on the consuming application's pointer-handling rather than libyang alone.

Exploit ScenarioDerived

An attacker supplies crafted YANG data to an application that parses it from a heap buffer via libyang's in-memory input API; once the parser advances past the start, the application later frees the pointer returned by ly_in_memory()/ly_in_memory_chunk(), which now points into the middle of the allocation, causing the C allocator to abort and crash the service (denial of service). No public exploit is identified at time of analysis, and no confidentiality or integrity impact results. Exploitability hinges on the embedding application calling free() on the returned pointer, so impact varies by how the library is consumed.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.9% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 25, 2026

Freeing the pointer returned by libyang's in-memory input helpers can hand an interior heap address to free() and abort the host process. libyang through 6.4.13 is affected: after any read advances the input cursor, ly_in_memory() and ly_in_memory_chunk() return in->current rather than in->start, so applications that parse YANG data from a heap buffer and later release the returned pointer crash rather than continue. Impact is availability only (no code execution, no data disclosure); the flaw requires a caller that actually frees that pointer, exploitation is rated difficult (AV:N/AC:H/AT:P in the assessed CVSS:3.1 vector), and no public exploit code was identified at time of analysis. The upstream fix is PR #2641 / commit 76c8009e.

RemediationAI

Patch available per vendor advisory: apply upstream commit 76c8009e63e52a5557cfafd68fbe44c22d732c74 (PR https://github.com/CESNET/libyang/pull/2641), which changes both ly_in_memory() and ly_in_memory_chunk() to return in->start instead of in->current, and update to the first libyang release carrying that commit - the input identifies no tagged fixed version, only that 6.4.13 and earlier are vulnerable, so verify the commit is present in the release you deploy. Because all downstream consumers of the library inherit the bug, rebuild and ship netopeer2/sysrepo/libnetconf2 and any other embedded copy against the fixed source rather than patching only the top-level application. Where rebuilding is not immediately possible, the compensating control is caller-side: never free() the pointer returned by ly_in_memory()/ly_in_memory_chunk() - retain the original buffer pointer and free that instead - or avoid the in-memory input API entirely when parsing untrusted YANG from heap buffers; the trade-off is manual pointer bookkeeping across every call site, which is easy to regress and does not fix the library itself. Severity is availability-only (process abort), priority this_week rather than emergency; no public exploit code was identified at time of analysis.

Affected VersionsENISA

libyang 0 ≤6.4.13

Affected Packages

euvd libyang 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

libyang is CESNET's YANG data modeling and parsing library used by network management stacks (netopeer2, sysrepo, libnetconf2 and similar tooling). CWE-761 covers freeing a pointer that does not point to the start of the allocated buffer, a class of undefined behavior that glibc's allocator typically detects and turns into an immediate abort. In src/in.c, the in-memory input constructors store the caller-supplied heap buffer in in->start and position the read cursor in in->current; the buggy versions of ly_in_memory() and ly_in_memory_chunk() extracted the buffer back out of in->current (line range ~214-250 in v6.4.13), so any prior ly_in_read() of one or more bytes relocated the returned address into the allocation's interior. The supplied patch diff is minimal and confirms the root cause: data = in->current is replaced by data = in->start in both functions, with a regression test in tests/utests/basic/test_inout.c that reads two bytes and then asserts the returned pointer equals the original string. The trigger is strictly caller-side - the library does not itself free that pointer on all paths, so only applications that treat the return value as an owned allocation are exposed; the exact attack requirement underpinning AC:H/AT:P is not described in the available sources.

Know when Libyang 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 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Availability-only impact (process abort) gives A:H with C:N/I:N; AV:N and PR:N follow the attacker-supplied network-reachable YANG data, and AC:H reflects the elevated complexity signaled in the source data.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

DescriptionCVE.org

libyang through 6.4.13 contains a release of invalid pointer vulnerability in ly_in_memory() and ly_in_memory_chunk() in src/in.c that return the current read position instead of the previous start address. Attackers supplying YANG data parsed from a heap buffer can cause applications freeing the returned pointer to pass an interior address to free(), aborting the process.

Executive ViewAI

Why It Matters

A high-severity heap memory flaw in libyang versions through 6.4.13 can cause host process crashes when applications free pointers returned by in-memory input helpers. This affects availability of network management systems and services using libyang, potentially disrupting operations and service delivery. Leadership should prioritize patching to avoid unplanned outages.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 43% exploitable
Prevalence
Medium
YANG parsing library common in network-management stacks, not ubiquitous general software
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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 HIGH
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0
CVE-2023-26917 HIGH POC
7.5 Apr 11

libyang from v2.0.164 to v2.1.30 was discovered to contain a NULL pointer dereference via the function lysp_stmt_validat

CVE-2021-28906 HIGH POC
7.5 May 20

In function read_yin_leaf() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. Rated

CVE-2021-28905 HIGH POC
7.5 May 20

In function lys_node_free() in libyang <= v1.0.225, it asserts that the value of node->module can't be NULL. Rated high

CVE-2021-28904 HIGH POC
7.5 May 20

In function ext_get_plugin() in libyang <= v1.0.225, it doesn't check whether the value of revision is NULL. Rated high

CVE-2021-28903 HIGH POC
7.5 May 20

A stack overflow in libyang <= v1.0.225 can cause a denial of service through function lyxml_parse_mem(). Rated high sev

CVE-2021-28902 HIGH POC
7.5 May 20

In function read_yin_container() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. R

CVE-2019-19334 CRITICAL
9.8 Dec 06

In all versions of libyang before 1.0-r5, a stack-based buffer overflow was discovered in the way libyang parses YANG fi

CVE-2019-19333 CRITICAL
9.8 Dec 06

In all versions of libyang before 1.0-r5, a stack-based buffer overflow was discovered in the way libyang parses YANG fi

CVE-2026-41401 HIGH
7.1 May 26

Heap use-after-free write in libyang before 5.2.6 enables remote authenticated attackers to crash processes or potential

CVE-2026-136907 MEDIUM
6.3 Nov 25

Wrong-status-code handling in CESNET libyang through 6.4.13 causes ly_in_filepath() in src/in.c to report success when t

CVE-2026-136906 MEDIUM
6.3 Nov 25

A file descriptor leak in libyang through 6.4.13 lets an attacker who can feed files into the library's by-path parsers

CVE-2026-136905 MEDIUM
6.3 Nov 25

In CESNET libyang through 6.4.13, ly_out_reset() in src/out.c rewinds a seekable output target but can skip the accompan

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