CVE-2025-4802
Linux Debian vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2025-4802) has been discovered in the GNU C Library versions 2.27 to 2.38, involving an untrusted LDLIBRARYPATH environment variable issue. The vulnerability affects statically compiled setuid binaries that call dlopen, including internal dlopen calls after setlocale or calls to NSS functions such as getaddrinfo (GNU Advisory, CVE Details).

Technical details

The vulnerability allows attacker-controlled loading of dynamically shared libraries in statically compiled setuid binaries through the LDLIBRARYPATH environment variable. When a static setuid program calls dlopen, it may incorrectly search LDLIBRARYPATH to locate the SONAME to load, potentially leading to the execution of attacker-controlled library code. The vulnerability was introduced in version 2.27 and affects versions up to 2.38 (OSS Security). The CVSS v3.1 base score is 9.8 (CRITICAL) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability could lead to the execution of attacker-controlled library code through compromised setuid binaries. While no specific vulnerable programs have been identified at the time of the advisory's publication, the potential impact is significant for any custom setuid programs that might exist in various environments (GNU Advisory).

Mitigation and workarounds

The vulnerability has been fixed in GNU C Library version 2.39. The fix involves proper handling of environment variables in dl-support.c. Some distributions have implemented alternative patches, such as the glibc-owl-alt-sanitize-env.patch, which hardens environment variable usage (OSS Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management