6.5Medium
CVE-2026-41401libyang - Heap Use-After-Free Write in XML Metadata Parsing
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.
Weakness (CWE):
CWE-416
Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.
Affected products and versions
References and patches
- GitHub Security Advisory (GHSA-9f49-8x56-jmjc) vendor-advisory
- https://github.com/CESNET/libyang/commit/6b5ed47ee674fbe86b31bbebc4ff26889aeff38c patch
- Anthropic CVD Finding ANT-2026-TZQ1KH7E third-party-advisory
- VulnCheck Advisory: libyang - Heap Use-After-Free Write in XML Metadata Parsing third-party-advisory