CVE-2021-3998
glibc: Unexpected return value from realpath() could leak data based on the application
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 11, 2022
Updated · November 21, 2025
Description
A flaw was found in glibc. The realpath() function can mistakenly return an unexpected value, potentially leading to information leakage and disclosure of sensitive data.
Statement
Red Hat Enterprise Linux 6, 7, and 8 are not affected by this issue as they ship an older version of glibc which does not include the vulnerable code (i.e. realpath_stk() function does not exist). Red Hat Enterprise Linux 9 is not affected because this CVE was fixed at 9.0 GA so there is no impact for customers.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE-125 · Out-of-bounds Read