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

CVE-2026-41401 is fixed in 3 products on 1 platform, first by libyang3 3.13.5-2ubuntu0.1, released May 26, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-41401
- Priority: Routine
- CVSS: 6.5 (Important)
- EPSS: 0.0067
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 26, 2026
- Weakness: Use After Free
- Vendor advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-41401

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

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libyang Debian 14 | 6.4.13-1 | [DEBIAN-CVE-2026-41401](https://patchblox.com/security/data/fix/linux/debian-cve-2026-41401.md) | May 26, 2026 |
| Linux | libyang opensuse-leap 16.0 | 2.1.148-160000.4.1 | [OPENSUSE-SU-2026:21113-1](https://patchblox.com/security/data/fix/linux/opensuse-su-2026-21113-1.md) | Jun 20, 2026 |
| Linux | libyang sles 15.6 | 2.1.55-150500.3.5.1 | [SUSE-SU-2026:2335-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2335-1.md) | Jun 10, 2026 |
| Linux | libyang sles 15.7 | 2.1.148-150700.3.5.1 | [SUSE-SU-2026:2337-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-2337-1.md) | Jun 10, 2026 |
| Linux | libyang sles 16.0 | 2.1.148-160000.4.1 | [SUSE-SU-2026:22208-1](https://patchblox.com/security/data/fix/linux/suse-su-2026-22208-1.md) | Jun 20, 2026 |
| Linux | libyang3 Ubuntu 25.10 (questing) | 3.13.5-2ubuntu0.1 | [libyang3 3.13.5-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-libyang3-3.13.5-2ubuntu0.1.md) | May 26, 2026 |
| Linux | libyang3 Ubuntu 26.04.1 LTS (resolute) | 3.13.6-1ubuntu0.1 | [libyang3 3.13.6-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-libyang3-3.13.6-1ubuntu0.1.md) | May 26, 2026 |
| Linux | libyang3-tools Ubuntu 25.10 (questing) | 3.13.5-2ubuntu0.1 | [libyang3-tools 3.13.5-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-libyang3-tools-3.13.5-2ubuntu0.1.md) | May 26, 2026 |
| Linux | libyang3-tools Ubuntu 26.04.1 LTS (resolute) | 3.13.6-1ubuntu0.1 | [libyang3-tools 3.13.6-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-libyang3-tools-3.13.6-1ubuntu0.1.md) | May 26, 2026 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
