Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInfluence reused libyang input handler
-
ExploitPoint handler at nonexistent or empty file
-
Executionly_in_filepath() returns false success
-
ImpactApplication parses previously loaded file's data as requested input
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V16 - Security Logging and Error Handling Return value error handling
|
| Exploitation Conditions | Exploitation requires an application built on libyang that reuses a single struct ly_in input handler across multiple ly_in_filepath() calls AND that lets an attacker cause one such call to target a nonexistent or empty file (the path need only be attacker-influenced, not attacker-written). Under those conditions ly_in_filepath() incorrectly reports success when the new file cannot be opened or mmap'd, so the handler retains the prior file's mapped data and subsequent parsing operates on that stale data. Limiting factors: it is NOT exploitable against ordinary single-use parsing; it depends on the specific handler-reuse code path, on attacker influence over the switched filepath, and on the application trusting the return status - which is why the supplied vector uses AC:H and AT:P. No authentication is required per PR:N, but the preconditions, not privileges, are the real gate. |
| Impact | This is a medium-severity logic flaw (CWE-393, return of wrong status code), and the signals collectively point to a real-but-non-urgent issue rather than a top priority. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) pairs a network vector and no required privileges with HIGH attack complexity and a present attack requirement (AT:P), which correctly reflects that exploitation is not simple or self-contained - it depends on a specific application usage pattern, not a default-config remote hit. Impact is bounded (VC:L/VI:L, VA:N), consistent with an application parsing the wrong (stale) input rather than a code-execution or full-disclosure outcome. The vuln.today decision label is 'this_month' (not act_now/emergency), there is no CISA KEV listing and no EPSS score in the supplied data, and no PoC/exploit reference is provided - only an issue report, the fix commit, a source-line pointer, and a VulnCheck advisory. Net assessment: patch within the normal cycle; this is a correctness/trust-of-input weakness in a library, meaningful for anything that reuses an input handler, but it is not a widespread-exploitation emergency. Missing data to note explicitly: EPSS and KEV status are absent from the input (treat as not-listed, not as confirmed-safe), and real-world impact depends entirely on how downstream applications use libyang's input handlers. |
| Exploit ScenarioDerived | An application that reuses a single libyang input handler (struct ly_in) across multiple parse operations is induced to switch that handler to a nonexistent or empty file whose path the attacker can influence. Because ly_in_filepath() returns success even though the new file could not be opened or mmap'd, the handler still points at the previously loaded file's data, so the application parses the old file's content as if it were the newly requested input - producing wrong configuration/data decisions. No public working exploit is identified; given AC:H/AT:P, triggering requires the specific handler-reuse pattern rather than a generic remote payload. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
Wrong-status-code handling in CESNET libyang through 6.4.13 causes ly_in_filepath() in src/in.c to report success when the requested file cannot be opened or mmap'd, so a reused struct ly_in input handler keeps serving the previously loaded file's mapped bytes. Applications that switch a shared handler to a new path and trust the return value can therefore parse stale data as if it were the requested input, giving limited confidentiality and integrity impact (CVSS 6.3; assessed CVSS:3.1/AV:N/AC:H/PR:N/UI:N/C:L/I:L/A:N). Exploitation is gated on a specific handler-reuse code path in the consuming application plus attacker influence over the switched filepath rather than on privileges; no public exploit code was identified at the time of analysis and the issue is not in CISA KEV, with an upstream fix commit available.
RemediationAI
Apply the upstream fix commit ed9b84f325fb88e1aa467417222c5f0d0ab51fb0 or deploy a libyang release that contains it; the provided data confirms an upstream fix but does not name a tagged release, so verify the commit is present in the version you ship rather than assuming a version number (issue tracking at https://github.com/CESNET/libyang/issues/2598, vendor advisory at https://www.vulncheck.com/advisories/libyang-through-6.4.13-wrong-status-code-in-ly-in-filepath). Applications that cannot rebuild against the fix should avoid reusing one struct ly_in across different files, reinitialize or revalidate the handler after every filepath switch, and audit every ly_in_filepath() call site to treat ((void *)-1) - and, for unpatched builds, a NULL return on the failing path - as fatal, aborting the parse instead of continuing with stale data; note that call sites which only test for NULL must be updated once the fixed version is adopted, otherwise the new sentinel will be misread as success. These workarounds reduce exposure only in code paths you control and do not correct the library-level status-code bug, so upgrading remains the complete fix.
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 a C library for parsing and validating YANG schemas and instance data. Its struct ly_in input abstraction wraps file descriptors, files and memory buffers; ly_in_new_filepath()/ly_in_filepath() open the target and mmap it, then set in->type to LY_IN_FILEPATH. The flaw is CWE-393 (return of wrong status code): the pre-fix code used an inverted/incorrect fd check (LY_CHECK_ERR_RET(!fd, ...)) and returned NULL where a distinct error sentinel was needed, so a file that could not be opened or mapped was reported as success while the handler still pointed at the prior mmap'd contents. The upstream patch (commit ed9b84f325fb88e1aa467417222c5f0d0ab51fb0) changes the guard to fd == -1, returns ((void *)-1) on failure instead of NULL, adds a missing close(fd) on the ly_in_new_fd error path and on the early-return path to fix an fd leak, and extends tests/utests/basic/test_inout.c with assertions that a missing or empty file is an error and that the handler retains (but does not silently misreport) its previous file. Because the error sentinel changed, callers written against the old NULL return need to be updated to test for ((void *)-1).
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:L/VI:L/VA:N/SC:N/SI:N/SA:N
Network-reachable via a reused handler but gated by a specific application reuse pattern and attacker-influenced path (AC:H), no privileges (PR:N); impact limited to parsing stale data (C:L/I:L, A:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
CESNET libyang through 6.4.13 contains a return of wrong status code vulnerability in ly_in_filepath() in src/in.c that reports success when a new file cannot be opened or mapped. Attackers who make an application switch a reused input handler to a nonexistent or empty file cause it to parse the previously loaded file's data as the requested input.
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
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Freeing the pointer returned by libyang's in-memory input helpers can hand an interior heap address to free() and abort
Heap use-after-free write in libyang before 5.2.6 enables remote authenticated attackers to crash processes or potential
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-135438
GHSA-3fmm-4mh3-vx58
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB