Skip to main content

libyang EUVDEUVD-2026-135439

| CVE-2026-136906 MEDIUM
Missing Release of File Descriptor or Handle after Effective Lifetime (CWE-775)
2026-11-25 VulnCheck GHSA-p58p-2jm4-88hq
6.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Supply attacker-controlled file path
  2. Exploit
    Repeatedly submit empty/unmappable files to libyang parser
  3. Impact
    Leaked descriptors exhaust process limit, later I/O and socket operations fail (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Resource release before removal
Exploitation Conditions

Exploitation requires the consuming application to pass attacker-influenced file paths into libyang's by-path parsing entry points lyd_parse_data_path() or lys_parse_path(), which internally call ly_in_new_filepath()/ly_in_filepath() in src/in.c. The descriptor leak is only triggered when the file mapping fails - the vendor test demonstrates this with an empty file ('Empty input file.') and an unopenable path - so the attacker must be able to supply such files (e.g. empty files) and submit them repeatedly to accumulate leaked descriptors until the process limit is reached. Limiting factors: the attack reaches the vulnerable code only in deployments that parse by file path rather than from in-memory buffers; impact is bounded to denial of service against the affected process with no data exposure or modification (VC:N/VI:N), and AC:H/AT:P reflect the required mapping-failure condition and repeated action.

Impact

This is a genuine but low-urgency availability issue, not a high-priority emergency. The CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 6.3 (Medium), and the only impact metric set is VA:L - a limited availability effect (file-descriptor exhaustion / denial of service) with no confidentiality (VC:N) or integrity (VI:N) consequence. AC:H plus AT:P signal that exploitation is not trivially repeatable on demand: a specific condition (file mapping failing, e.g. an empty file) must be met and the attack must be repeated enough to exhaust descriptors. No EPSS score was provided and the input does not list CISA KEV status, so there is no signal of active exploitation; the vuln.today Decision label is 'this_month', consistent with a patch-when-convenient priority rather than act_now/emergency. No SSVC decision fields (automatable, technical impact) were supplied. The practical risk hinges entirely on whether an application exposes the by-path parsing APIs (lyd_parse_data_path()/lys_parse_path()) to attacker-controlled input, which is deployment-specific - many libyang consumers parse in-memory buffers rather than file paths, which would not reach the vulnerable code.

Exploit ScenarioDerived

In an application that calls libyang's lyd_parse_data_path() or lys_parse_path() on attacker-supplied file paths, an attacker repeatedly submits empty files whose memory-mapping fails; each failed attempt leaks an open descriptor that is never closed. After enough submissions the process exhausts its file-descriptor limit, causing subsequent file and socket operations to fail (denial of service). No public working exploit code is identified; the trigger mechanism is documented in a vendor bug report and the patch diff, and AC:H/AT:P indicate the attacker must satisfy the mapping-failure condition and repeat the action.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.6% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 25, 2026

A file descriptor leak in libyang through 6.4.13 lets an attacker who can feed files into the library's by-path parsers (lyd_parse_data_path() or lys_parse_path()) exhaust a process's descriptor table and cause subsequent file and socket operations to fail. The leak occurs in ly_in_new_filepath() and ly_in_filepath() in src/in.c when opening or mapping the supplied file fails - the vendor's own test exercises it with an empty file and with an unopenable path - so repeated submission of such files accumulates leaked descriptors. Impact is limited to availability of the consuming process (no confidentiality or integrity effect), no public exploit code was identified at time of analysis, and an upstream fix commit is available.

RemediationAI

Apply the upstream fix commit https://github.com/CESNET/libyang/commit/ed9b84f325fb88e1aa467417222c5f0d0ab51fb0 (adds close(fd) in both failure branches of ly_in_new_filepath() and ly_in_filepath() and switches the error sentinel to ((void *)-1)); vendor patch availability is reported, but a specific tagged release containing the commit is not confirmed in the available data, so verify the fix is present in the release you deploy rather than assuming a version number. Because the flaw is only reachable through the by-path entry points, a compensating control is to parse from in-memory buffers (lyd_parse_data_mem()/lys_parse_mem()) and to avoid passing externally supplied paths into lyd_parse_data_path()/lys_parse_path() - the trade-off is that consumers which genuinely need path-based loading (module search paths, on-disk schema directories) must be refactored or fronted by a trusted staging step. Applications that cannot change their parsing model should restrict which paths can reach these calls and monitor or cap the process descriptor budget (RLIMIT_NOFILE plus alerting on descriptor growth), accepting that this only shortens the window before the DoS rather than removing it. Advisories: https://github.com/CESNET/libyang/issues/2598 and https://www.vulncheck.com/advisories/libyang-through-6.4.13-file-descriptor-leak-via-ly-in-new-filepath.

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 C library for parsing and validating YANG schemas (lys_*) and instance data (lyd_*), and it is embedded in NETCONF/RESTCONF servers, network management stacks and other tooling that load YANG modules from disk. The affected code path is the file-backed input abstraction in src/in.c: ly_in_new_filepath() opens the path, hands the descriptor to ly_in_new_fd(), and ly_in_filepath() additionally records the previous descriptor. Both rely on the LY_CHECK_ERR_RET cleanup macro, and the cleanup list in the vulnerable versions only freed the allocated path string - it did not close the descriptor when the open or the mapping step reported failure. The root cause class is CWE-775 (Missing Release of File Descriptor or Handle after Effective Lifetime). The upstream commit ed9b84f325fb88e1aa467417222c5f0d0ab51fb0 adds close(fd) to both error branches, changes the failure sentinel from NULL to ((void *)-1) so a failed re-assignment no longer discards the previously held handler, and adds regression tests asserting that the handler keeps its file after a failed open and after an empty input file. Reachability depends on the embedding application: code that parses from memory buffers never touches these entry points, and the leak only materialises when the mapping step fails rather than on every call.

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 6.3 MEDIUM
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 3.7 LOW

No auth or interaction needed (PR:N/UI:N); AC:H because the attacker must force repeated mapping failures to exhaust descriptors; impact is availability-only (A:L), no C/I effect.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:H/AT:P/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
High
Attack Requirements
Present
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

libyang through 6.4.13 contains a file descriptor leak in ly_in_new_filepath() and ly_in_filepath() in src/in.c that fails to close descriptors when file mapping fails. Attackers who can supply files parsed through lyd_parse_data_path() or lys_parse_path() can repeatedly submit empty files to exhaust descriptors, causing later file and socket operations to fail.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
Medium
YANG parsing library common in NETCONF/RESTCONF network management stacks, not universal
Social Media
1
Sightings
Data Quality
5 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 0.6%
Patch available Yes
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
No
Human Impact· derived
Medium

Priority Score

33
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +32
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-136908 HIGH
8.2 Nov 25

Freeing the pointer returned by libyang's in-memory input helpers can hand an interior heap address to free() and abort

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