CVE-2021-28902 json
In function read_yin_container() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL.
published 2021-05-20 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-15555
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
In function read_yin_container() in libyang <= v1.0.225, it doesn't check whether the value of retval->ext[r] is NULL. In some cases, it can be NULL, which leads to the operation of retval->ext[r]->flags that results in a crash.
Patch / fix
- libyang Debian 14, Debian 13 3.4.2+dfsg-2
debian advisories DEBIAN-CVE-2021-28902
- libyang SLE Module for Server Applications 15 SP4, SLE Module for Server Applications 15 SP3, openSUSE Leap 15.4 +1 more 1.0.184-150300.3.6.1
suse advisories SUSE-SU-2022:3245-1
- libyang Alpine 3.13 1.0.184-r1
- libyang Alpine 3.14 1.0.215-r1
alpine advisories ALPINE-CVE-2021-28902
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-28902 updated cvss 7.5
libyang: NULL pointer dereference in read_yin_container()
-
Red Hat Enterprise Linux 8 libyangaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux 9 libyangnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.55% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/CESNET/libyang/issues/1454 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
- Weakness
-
- CWE-252 Unchecked Return Value
References
-
github.com
/CESNET/libyang/issues/1454
exploit, issue-tracking, third-party-advisory
-
security.gentoo.org
/glsa/202107-54
vendor-advisory, third-party-advisory
Sources
- CVE List CVE-2021-28902
- NVD CVE-2021-28902
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.