Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted YANG data to in-memory parser
-
DeliveryParser advances read position past buffer start
-
Exploitly_in_memory returns interior heap pointer
-
ExecutionApplication calls free() on interior address
-
ImpactAllocator 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
libyang from v2.0.164 to v2.1.30 was discovered to contain a NULL pointer dereference via the function lysp_stmt_validat
In function read_yin_leaf() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. Rated
In function lys_node_free() in libyang <= v1.0.225, it asserts that the value of node->module can't be NULL. Rated high
In function ext_get_plugin() in libyang <= v1.0.225, it doesn't check whether the value of revision is NULL. Rated high
A stack overflow in libyang <= v1.0.225 can cause a denial of service through function lyxml_parse_mem(). Rated high sev
In function read_yin_container() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. R
In all versions of libyang before 1.0-r5, a stack-based buffer overflow was discovered in the way libyang parses YANG fi
In all versions of libyang before 1.0-r5, a stack-based buffer overflow was discovered in the way libyang parses YANG fi
Heap use-after-free write in libyang before 5.2.6 enables remote authenticated attackers to crash processes or potential
Wrong-status-code handling in CESNET libyang through 6.4.13 causes ly_in_filepath() in src/in.c to report success when t
A file descriptor leak in libyang through 6.4.13 lets an attacker who can feed files into the library's by-path parsers
In CESNET libyang through 6.4.13, ly_out_reset() in src/out.c rewinds a seekable output target but can skip the accompan
EUVD-2026-135437
GHSA-crrx-r3x8-rp53
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB