GHSA-w5w5-8vfh-xcjq: Whoami Whoami Stack Buffer Overflow On Vulnerability
HIGHGHSA-w5w5-8vfh-xcjq is a HIGH (CVSS 8.2) whoami stack buffer overflow on vulnerability (CWE-121: Stack-based Buffer Overflow) affecting Whoami libraries in the crates.io ecosystem. The issue involves whoami stack buffer overflow on several unix platforms. Remediation is available by upgrading affected packages to version 1.5.0.
GHSA-w5w5-8vfh-xcjq at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H).
How to Fix GHSA-w5w5-8vfh-xcjq
To remediate this vulnerability, upgrade all affected Whoami dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade whoami to 1.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for whoami
How to Check if You Are Affected
To determine whether your application is affected by GHSA-w5w5-8vfh-xcjq, inspect your project dependencies for Whoami:
inspect dependencies for whoami
Analyze the terminal output to locate any version of Whoami in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-121: Stack-based Buffer Overflow, where a stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). In Whoami, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-w5w5-8vfh-xcjq Affected Whoami Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
whoami
|
crates.io |
≥ 0.5.3
< 1.5.0
|
1.5.0
|
References
Frequently Asked Questions
What is GHSA-w5w5-8vfh-xcjq?
Which Whoami versions are affected?
What version fixes GHSA-w5w5-8vfh-xcjq?
Is whoami affected?
What is the CVSS score of GHSA-w5w5-8vfh-xcjq?
What CWE is associated with GHSA-w5w5-8vfh-xcjq?
How can I check crates.io dependencies for GHSA-w5w5-8vfh-xcjq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w5w5-8vfh-xcjq",
"modified" : "2024-04-05T15:39:19Z",
"published" : "2024-04-05T15:39:19Z",
"aliases" : [ ],
"summary" : "whoami stack buffer overflow on several Unix platforms",
"details" : "With versions of the whoami crate >= 0.5.3 and < 1.5.0, calling any of these functions leads to an immediate stack buffer overflow on illumos and Solaris:\n\n- `whoami::username`\n- `whoami::realname`\n- `whoami::username_os`\n- `whoami::realname_os`\n\nWith versions of the whoami crate >= 0.5.3 and < 1.0.1, calling any of the above functions also leads to a stack buffer overflow on these platforms:\n\n- Bitrig\n- DragonFlyBSD\n- FreeBSD\n- NetBSD\n- OpenBSD\n\nThis occurs because of an incorrect definition of the `passwd` struct on those platforms.\n\nAs a result of this issue, denial of service and data corruption have both been observed in the wild. The issue is possibly exploitable as well.\n\nThis vulnerability also affects other Unix platforms that aren't Linux or macOS.\n\nThis issue has been addressed in whoami 1.5.0.\n\nFor more information, see [this GitHub issue](https://github.com/ardaku/whoami/issues/91).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "whoami"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.3"
}, {
"fixed" : "1.5.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ardaku/whoami/issues/91"
}, {
"type" : "WEB",
"url" : "https://github.com/ardaku/whoami/commit/d6ee13ed9e818aa51b8d86d95e8009a376289a40"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ardaku/whoami"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0020.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-121" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-05T15:39:19Z",
"nvd_published_at" : null
}
}