GHSA-w5w5-8vfh-xcjq
HIGH 8.2CVSS 3.1whoami stack buffer overflow on several Unix platforms
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:
whoami::usernamewhoami::realnamewhoami::username_oswhoami::realname_os
With 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:
- Bitrig
- DragonFlyBSD
- FreeBSD
- NetBSD
- OpenBSD
This occurs because of an incorrect definition of the passwd struct on those platforms.
As 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.
This vulnerability also affects other Unix platforms that aren't Linux or macOS.
This issue has been addressed in whoami 1.5.0.
For more information, see this GitHub issue.
- Published
- 28 Feb 2024
- Last modified
- 11 Apr 2024
- Weakness
- CWE-121
- Also known as
- RUSTSEC-2024-0020
- Sources
- OSVJSONOSV RUSTSEC-2024-0020JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 3.1 | HIGH 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | whoami | >= 0.5.3, < 1.5.0 | 1.5.0 |
References
- https://github.com/ardaku/whoami/issues/91 · WEB, REPORT
- https://github.com/ardaku/whoami/commit/d6ee13ed9e818aa51b8d86d95e8009a376289a40 · WEB
- https://github.com/ardaku/whoami · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2024-0020.html · WEB, ADVISORY
- https://crates.io/crates/whoami · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 28 Feb 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 Apr 2024)