🛡️ GHSA-w5w5-8vfh-xcjq — whoami

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-121 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

whoami 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::username
  • whoami::realname
  • whoami::username_os
  • whoami::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](https://github.com/ardaku/whoami/issues/91).

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity low, availability high.

Weakness class

GHSA-w5w5-8vfh-xcjq is classified as CWE-121: Stack-based Buffer Overflow. An oversized write to a stack buffer overwrites saved state such as return addresses, which can redirect execution.

Affected software

GHSA-w5w5-8vfh-xcjq is recorded against 1 package.

  • whoami

Timeline and source

Published on 5 April 2024 and last revised on 11 April 2024. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Web)
github.com (Package)
rustsec.org (Web)

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
CWE CWE-121
Public Exploit ✅ No
Source OSV
Published 2024-04-05
Updated 2026-08-20
Modified 2024-04-11
Fix URL N/A

Affected Packages

Software From version Fixed in
whoami

Similar Threats

Site Security Check

Is whoami part of your stack?

GHSA-w5w5-8vfh-xcjq is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated