Quick answers
- Is CVE-2026-41401 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-41401 being exploited in the wild.
- How severe is CVE-2026-41401?
- Medium severity, with a CVSS score of 6.5, published 26 May 2026.
- Which products and versions are affected?
- CESNET Libyang < 5.2.6.
- Is there a fix for CVE-2026-41401?
- A patch was published on 2026-03-26: Patch released in version 5.2.6 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-41401 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-41401?
- Check whether you run CESNET Libyang at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
A heap use-after-free write vulnerability exists in libyang's XML data parser within the 'lyd_parser_set_data_flags' function in 'src/parser_common.c'. The root cause is an incorrect update of the metadata linked list head pointer when freeing a non-head 'default' metadata entry. An attacker can trigger this by submitting a crafted YANG XML document with specific metadata attributes to an application using libyang to parse untrusted data. This results in a reference to freed heap memory being subsequently written to in 'lyd_insert_meta', leading to memory corruption, process crashes, or potential remote code execution. The issue is fixed in version 5.2.6.
Affected products
- CESNET libyang < 5.2.6
Timeline
- 2026-03-26: patched: Patch released in version 5.2.6
- 2026-03-26: advisory: GitHub Security Advisory published
- 2026-05-26: disclosed: CVE published to NVD
References
- https://github.com/CESNET/libyang/commit/6b5ed47ee674fbe86b31bbebc4ff26889aeff38c
- https://github.com/CESNET/libyang/security/advisories/GHSA-9f49-8x56-jmjc
- https://red.anthropic.com/2026/cvd/findings/ANT-2026-TZQ1KH7E
- https://www.vulncheck.com/advisories/libyang-heap-use-after-free-write-in-xml-metadata-parsing