CVE-2026-41401
Description
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-41401 NameCVE-2026-41401 Descriptionlibyang 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โฆ
CVE-2026-41401
| Name | CVE-2026-41401 |
| Description | 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| libyang (PTS) | bullseye | 1.0.225-1.1 | vulnerable |
| trixie | 3.12.2-1 | vulnerable | |
| forky, sid | 3.13.6-1 | vulnerable | |
| libyang2 (PTS) | bookworm | 2.1.30-2 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| libyang | source | (unstable) | (unfixed) | |||
| libyang2 | source | (unstable) | (unfixed) |
Notes
[trixie] - libyang <no-dsa> (Minor issue)
[bookworm] - libyang2 <no-dsa> (Minor issue)
https://github.com/CESNET/libyang/security/advisories/GHSA-9f49-8x56-jmjc
Fixed by: https://github.com/CESNET/libyang/commit/54c3276d871023da266d4ed3ceaee7e8d71d0b04 (v5.4.9)
Apply commands
[trixie] - libyang <no-dsa> (Minor issue)[bookworm] - libyang2 <no-dsa> (Minor issue)https://github.com/CESNET/libyang/security/advisories/GHSA-9f49-8x56-jmjcFixed by: https://github.com/CESNET/libyang/commit/54c3276d871023da266d4ed3ceaee7e8d71d0b04 (v5.4.9)
OS impact
Debian Affected 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Affected | โ |
| sid | Affected | โ |
| forky | Affected | โ |
| bullseye | Affected | โ |
| bookworm | Affected | โ |
SUSE Affected 1 release
| Version | Status | Fixed in |
|---|---|---|
| โ | Affected | โ |
Windows Affected 1 release
| Version | Status | Fixed in |
|---|---|---|
| โ | Affected | โ |
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
- https://www.suse.com/security/cve/CVE-2026-41401.html
- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-41401
- https://security-tracker.debian.org/tracker/CVE-2026-41401
CWEs
CWE-416
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.