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

Published May 26, 2026
·
Updated

Last updated 30 June 2026

Other sources

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

— Microsoft

libyang before 5.2.6 contains a heap use-after-free write vulnerability in lydparsersetdataflags 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.

— Launchpad

libyang before 5.4.3 contains a heap use-after-free write vulnerability in lydparsersetdataflags 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.

— MITRE

Affected Software

11 affected componentsFixes available
libyang libyang<5.2.6
Microsoft azl3 libyang 2.1.148-1
debian/libyang<=3.12.2-1
6.4.13-1
debian/libyang2<=2.1.30-2
debian/libyang*
debian/libyang<6.4.13-1
6.4.13-1
debian/libyang2*
ubuntu/libyang*
ubuntu/libyang*
ubuntu/libyang<3.13.5-2ubuntu0.1
3.13.5-2ubuntu0.1
ubuntu/libyang<3.13.6-1ubuntu0.1
3.13.6-1ubuntu0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/libyang to a version that resolves this vulnerability.

    Fixed in 6.4.13-1
  2. Upgrade

    Upgrade ubuntu/libyang to a version that resolves this vulnerability.

    Fixed in 3.13.5-2ubuntu0.1
  3. Upgrade

    Upgrade ubuntu/libyang to a version that resolves this vulnerability.

    Fixed in 3.13.6-1ubuntu0.1
  4. Upgrade

    Upgrade libyang to a version that resolves this vulnerability.

    Fixed in 5.2.6
  5. Upgrade

    Upgrade libyang to a version that resolves this vulnerability.

    Fixed in 5.4.3

Event History

May 26, 2026
CVE Published
via MITRE·02:08 PM
Data Sourced
via OSV·02:08 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeakness
May 27, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:01 AM
Affected Software
Nov 5, 2026
Data Sourced
via OSV·11:46 AM
Affected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-41401?

The severity of CVE-2026-41401 is rated medium with a score of 6.5.

2

What type of vulnerability is found in CVE-2026-41401?

CVE-2026-41401 is a heap use-after-free write vulnerability.

3

How can attackers exploit CVE-2026-41401?

Attackers can exploit CVE-2026-41401 by submitting crafted YANG XML documents with specific metadata.

4

How do I fix CVE-2026-41401?

To fix CVE-2026-41401, update libyang to version 5.2.6 or later.

5

Which software is affected by CVE-2026-41401?

The affected software for CVE-2026-41401 is libyang, specifically versions prior to 5.2.6.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203