Use-after-free in libyang - #VU165956

 

Use-after-free in libyang - #VU165956

Published: November 12, 2026


Vulnerability identifier: #VU165956
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service or potentially execute arbitrary code.

The vulnerability exists due to use-after-free in libyang's schema compiler when lyplg_type_store_union() frees storage on error and lys_compile_unres_dflt() subsequently dereferences and frees the same storage. A remote attacker can supply a crafted YANG module containing a union typedef with a leafref member and an out-of-range default value, such as "999" for int8, to trigger use-after-free and double-free, crashing the parser or potentially hijacking control flow.


Affected software

libyang

Remediation

Install security update from vendor's website.

libyang - update to 5.2.0

External References

Related Security Bulletins