Skip to main content

libyang CVE-2026-41401

| EUVDEUVD-2026-31832 HIGH
Use After Free (CWE-416)
2026-05-26 VulnCheck GHSA-v7jp-vmx6-5429
7.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Obtain low-privileged management account
  2. Delivery
    Craft YANG XML with malicious default metadata
  3. Exploit
    Submit to NETCONF/RESTCONF endpoint
  4. Execution
    Trigger UAF in lyd_parser_set_data_flags
  5. Persist
    Corrupt heap on freed metadata entry
  6. Impact
    Crash daemon or pivot to code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the target to use libyang to parse attacker-supplied YANG XML, and the attacker must already have low-privileged access (CVSS PR:L) - typically an authenticated NETCONF/RESTCONF or sysrepo client account on a network device or management plane. The malicious payload must specifically include default metadata attributes that trigger freeing of a non-head entry in the metadata list, exercising lyd_parser_set_data_flags. Limiting factors: no user interaction is needed (UI:N) and the attack vector is network (AV:N), but PR:L excludes fully unauthenticated attackers, and only applications that actually expose libyang-backed XML parsing to clients are exposed - pure schema-compile or trusted-input deployments are not in scope.

Impact

CVSS 4.0 7.1 reflects AV:N/AC:L with PR:L and only availability impact (VA:H), which is consistent with a parser-side crash from a malformed document submitted by a low-privileged client; SSVC corroborates this with Exploitation:poc, Automatable:no, Technical Impact:partial. EPSS at 0.03% (9th percentile) and absence from CISA KEV indicate no observed mass exploitation, and no public exploit was identified at time of analysis despite VulnCheck reporting. There is a notable data conflict: the CVE description sets the fixed version at 5.2.6, while the EUVD record lists affected range as 0 <5.4.3 - defenders should verify the authoritative fix version with the upstream GHSA-9f49-8x56-jmjc advisory before deploying. Also note CVSS scores VC:N/VI:N (no confidentiality or integrity impact) yet the description mentions 'potential code execution,' so memory-corruption-to-RCE is theoretically possible but not reflected in the vector - treat the realistic priority as a denial-of-service issue against network management daemons unless the GHSA upgrades that assessment.

Exploit ScenarioDerived

An attacker with low-privileged access to a NETCONF or RESTCONF endpoint (or any application that hands user-supplied XML to libyang) submits a crafted YANG XML document containing specific default metadata attributes that exercise the non-head free path in lyd_parser_set_data_flags. The use-after-free write corrupts heap state, most reliably crashing the management daemon and disrupting network configuration services; code execution is theoretically possible but no public exploit has been identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Jun 08, 2026

Heap use-after-free write in libyang before 5.2.6 enables remote authenticated attackers to crash processes or potentially execute code by submitting crafted YANG XML documents to applications using the library for parsing. The flaw resides in lyd_parser_set_data_flags, which mishandles metadata list pointers when freeing non-head default metadata entries. No public exploit identified at time of analysis, EPSS is low at 0.03%, and SSVC rates technical impact as partial with no automatable exploitation.

RemediationAI

Upgrade libyang to the patched release identified by CESNET (the CVE text cites 5.2.6; the EUVD record implies 5.4.3 - confirm the exact version via the GHSA-9f49-8x56-jmjc advisory at https://github.com/CESNET/libyang/security/advisories/GHSA-9f49-8x56-jmjc, with the fix commit at https://github.com/CESNET/libyang/commit/6b5ed47ee674fbe86b31bbebc4ff26889aeff38c). For Red Hat and SUSE deployments, apply the distribution-provided libyang package update once published. Where immediate patching is not possible, restrict the ability of low-privileged users to submit arbitrary YANG XML to NETCONF/RESTCONF or sysrepo endpoints by tightening NACM/AAA rules and network ACLs on management interfaces, and consider validating or rejecting client-supplied XML containing unexpected metadata attributes at a proxy; the trade-off is potential disruption of legitimate management automation that relies on those metadata extensions.

Affected VersionsENISA

libyang 0 <5.4.3

Affected Packages

euvd libyang fix: 5.4.3

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 the CESNET-maintained C library that parses, validates, and manipulates YANG-modeled data, widely embedded in network management stacks including sysrepo, FRRouting, and Red Hat/SUSE platform tooling for NETCONF/RESTCONF processing. The vulnerability is a CWE-416 Use-After-Free in the XML metadata parsing path: lyd_parser_set_data_flags incorrectly updates the linked-list pointers of default metadata entries when a non-head entry is freed, leaving a dangling pointer that is later written to. Because libyang sits at the XML-to-internal-tree boundary, any application that hands attacker-influenced YANG XML to the parser inherits the bug. The affected CPE is cpe:2.3:a:libyang:libyang covering all versions before the fixed release.

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 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat 6.5 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
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

Lifecycle Timeline

2
Severity Changed
May 26, 2026 - 15:22 NVD
MEDIUM HIGH
CVSS changed
May 26, 2026 - 15:22 NVD
6.5 (MEDIUM) 7.1 (HIGH)

DescriptionCVE.org

libyang before 5.2.6 contains a heap use-after-free write vulnerability in lyd_parser_set_data_flags that incorrectly updates metadata list pointers when freeing non-head default metadata entries. Attackers can trigger this vulnerability by submitting crafted YANG XML documents with specific metadata attributes to applications parsing untrusted XML data, causing process crashes or potential code execution.

Executive ViewAI

Why It Matters

libyang XML parsing library before version 5.2.6 contains a heap use-after-free vulnerability allowing authenticated users to disrupt services or compromise systems through specially crafted YANG documents. Organizations deploying applications reliant on libyang for configuration management or network device integration must immediately prioritize patching to prevent operational outages and unauthorized access.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL GitHub VulDB

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.0%
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected
SUSE Linux Enterprise Module for Server Applications 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected

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