This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate testdir

Dependencies

(7 total, 3 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 anyhow^1.0.201.0.95up to date
 backtrace^0.3.550.3.74up to date
 cargo-platform>=0.1.2, <0.1.90.1.9out of date
 cargo_metadata^0.14.00.19.1out of date
 once_cell^1.51.20.2up to date
 sysinfo^0.260.33.1out of date
 whoami ⚠️^11.5.2maybe insecure

Dev dependencies

(1 total, all up-to-date)

CrateRequiredLatestStatus
 tempfile^33.15.0up to date

Security Vulnerabilities

whoami: Stack buffer overflow with whoami on several Unix platforms

RUSTSEC-2024-0020

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.