Vulnerability · Published May 26, 2026 · Assigned by VulnCheck

CVE-2026-41401libyang - Heap Use-After-Free Write in XML Metadata Parsing

Medium 6.5

In plain English

A medium-severity use-after-free in libyang from libyang. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.7%top 47.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

libyang before 5.4.3 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13libyangno fix listedDEBIAN-CVE-2026-41401
Debian:14libyang6.4.13-1DEBIAN-CVE-2026-41401
Debian:12libyang2no fix listedDEBIAN-CVE-2026-41401
Ubuntu:22.04:LTSlibyangno fix listedUBUNTU-CVE-2026-41401
Ubuntu:25.10libyang3.13.5-2ubuntu0.1USN-8485-1
Ubuntu:25.10libyang3.13.5-2ubuntu0.1UBUNTU-CVE-2026-41401
Ubuntu:26.04:LTSlibyang3.13.6-1ubuntu0.1UBUNTU-CVE-2026-41401
Ubuntu:26.04:LTSlibyang3.13.6-1ubuntu0.1USN-8485-1

Affected products (as reported)

VendorProductVersions
libyang libyang 0 – before 5.4.3

Weakness: CWE-416 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References