CVE-2026-41401 PUBLISHED

libyang - Heap Use-After-Free Write in XML Metadata Parsing

Assigner: VulnCheck
Reserved: 20.04.2026 Published: 26.05.2026 Updated: 26.05.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 6.9

Product Status

Vendor libyang
Product libyang
Versions Default: unaffected
  • affected from 0 to 5.4.3 (excl.)
  • Version 5.4.3 is unaffected

Credits

  • kevin-valerio reporter

References

Problem Types

  • Use After Free CWE