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

- Severity: Medium 6.9 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 45% of CVEs (2026-11-30)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-05-26T14:08:48.973Z
- Modified: 2026-11-08T14:02:59.788Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- libyang libyang: before 5.4.3 (not affected: 5.4.3)

## Every score

- VulnCheck: CVSS:4.0 6.9 Medium `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`
- VulnCheck: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/CESNET/libyang/security/advisories/GHSA-9f49-8x56-jmjc> (exploit, vendor-advisory)
- <https://red.anthropic.com/2026/cvd/findings/ANT-2026-TZQ1KH7E> (exploit, third-party-advisory)
- <https://github.com/CESNET/libyang/commit/6b5ed47ee674fbe86b31bbebc4ff26889aeff38c> (patch)
- <https://www.vulncheck.com/advisories/libyang-heap-use-after-free-write-in-xml-metadata-parsing> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-41401](https://www.cve.org/CVERecord?id=CVE-2026-41401), CVE Terms of Use, modified 2026-11-08
- NVD: [CVE-2026-41401](https://nvd.nist.gov/vuln/detail/CVE-2026-41401), Public domain, modified 2026-10-29

---

Page: https://cve.day/CVE-2026-41401 · Whole record: https://cve.day/CVE-2026-41401.json · Rebuilt by cve.day 2026-11-25T22:59:22.323Z
