CVE-2023-1521: sccache vulnerable to privilege escalation if server is run as root
8.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.51302%
CWE
Published
5/30/2023
Updated
1/26/2025
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| sccache | rust | < 0.4.0 | 0.4.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the client sending its environment variables (including LD_PRELOAD) to the server during compilation requests. The code in src/commands.rs lines 371-376 explicitly includes env_vars in the Compile request struct. A FIXME comment in src/cmdline.rs:279 acknowledges the risk of not sanitizing LD_PRELOAD. The server's execution environment inherits these variables, enabling privilege escalation when running as root. The function responsible for constructing and sending these tainted environment variables is the root cause.