Skip to content
OpenAdvisories
Medium · 6.5 CVE-2026-41401 EUVD-2026-31832GHSA-v7jp-vmx6-5429

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

Published May 26, 2026 · Updated Nov 8, 2026 · 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.

Affected products

VendorProductAffectedFixed
libyang libyang < 5.4.3 5.4.3

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libyang 6.4.13-1 —
Debian 13 libyang No fix yet —
Debian 12 libyang2 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libyang 3.13.6-1ubuntu0.1 USN-8485-1
Ubuntu 25.10 libyang 3.13.5-2ubuntu0.1 USN-8485-1
Ubuntu 22.04 LTS libyang No fix yet —
Ubuntu 20.04 LTS libyang No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 libyang 2.1.148-150700.3.5.1 SUSE-SU-2026:2337-1
SLES 15 SP6 libyang 2.1.55-150500.3.5.1 SUSE-SU-2026:2335-1
SLES 15 SP5 libyang 2.1.55-150500.3.5.1 SUSE-SU-2026:2335-1
SLES 12 SP5 libyang 2.1.148-8.8.1 SUSE-SU-2026:2334-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 libyang 2.1.148-160000.4.1 SUSE-SU-2026:22208-1, SUSE-SU-2026:22200-1
SLES for SAP 15 SP6 libyang 2.1.55-150500.3.5.1 SUSE-SU-2026:2335-1
SLES for SAP 15 SP5 libyang 2.1.55-150500.3.5.1 SUSE-SU-2026:2335-1
SLES 16.0 libyang 2.1.148-160000.4.1 SUSE-SU-2026:22208-1, SUSE-SU-2026:22200-1
SLE HPC 15 SP5 libyang 2.1.55-150500.3.5.1 SUSE-SU-2026:2335-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libyang 3.13.6-2.1 openSUSE-SU-2026:10868-1
openSUSE Leap 16.0 libyang 2.1.148-160000.4.1 openSUSE-SU-2026:21113-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 libyang 2.1.148-3 —

Advisories 8

References