PyPI: libyang

CVE-2021-28902

Safety vulnerability ID: SFTY-20210520-46160

Safety legacy ID: pyup.io-62213

In function read_yin_container() in libyang <= v1.0.225 or possibly <= 1.0.240 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.

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

In function read_yin_container() in libyang <= v1.0.225 or possibly <= 1.0.240 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.

Advisory

In function read_yin_container() in libyang <= v1.0.225 or possibly <= 1.0.240 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.

Affected Package

Affecting libyang package, versions<1.0.240

Also affects

---

How to Fix

Upgradelibyangto1.1.0or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more