This project contains known security vulnerabilities. Find detailed information at the bottom.

Crate sqlx-mysql

Dependencies

(39 total, 4 outdated, 1 insecure, 3 possibly insecure)

CrateRequiredLatestStatus
 atoi^2.02.0.0up to date
 base64^0.22.00.22.1up to date
 bigdecimal^0.4.00.4.10up to date
 bitflags^22.11.0up to date
 byteorder^1.4.31.5.0up to date
 bytes ⚠️^1.1.01.11.1maybe insecure
 chrono^0.4.340.4.44up to date
 crc^3.0.03.4.0up to date
 digest^0.10.00.11.1out of date
 dotenvy^0.15.50.15.7up to date
 either^1.6.11.15.0up to date
 futures-channel^0.3.190.3.32up to date
 futures-core^0.3.190.3.32up to date
 futures-io^0.3.240.3.32up to date
 futures-util^0.3.190.3.32up to date
 generic-array^0.14.41.3.5out of date
 hex^0.4.30.4.3up to date
 hkdf^0.12.00.12.4up to date
 hmac^0.12.00.12.1up to date
 itoa^1.0.11.0.17up to date
 log^0.4.180.4.29up to date
 md-5^0.10.00.10.6up to date
 memchr^2.4.12.8.0up to date
 once_cell^1.9.01.21.3up to date
 percent-encoding^2.1.02.3.2up to date
 rand^0.8.40.10.0out of date
 rsa ⚠️^0.90.9.10insecure
 rust_decimal^1.26.11.40.0up to date
 serde^1.0.1441.0.228up to date
 sha1^0.10.10.10.6up to date
 sha2^0.10.00.10.9up to date
 smallvec^1.7.01.15.1up to date
 sqlx-core=0.8.60.8.6up to date
 stringprep^0.1.20.1.5up to date
 thiserror^2.0.02.0.18up to date
 time ⚠️^0.3.360.3.47maybe insecure
 tracing^0.1.370.1.44up to date
 uuid^1.1.21.22.0up to date
 whoami ⚠️^1.2.12.1.1out of date

Dev dependencies

(1 total, all up-to-date)

CrateRequiredLatestStatus
 sqlx=0.8.60.8.6up to date

Security Vulnerabilities

rsa: Marvin Attack: potential key recovery through timing sidechannels

RUSTSEC-2023-0071

Impact

Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key.

Patches

No patch is yet available, however work is underway to migrate to a fully constant-time implementation.

Workarounds

The only currently available workaround is to avoid using the rsa crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer is fine.

References

This vulnerability was discovered as part of the "Marvin Attack", which revealed several implementations of RSA including OpenSSL had not properly mitigated timing sidechannel attacks.

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.

bytes: Integer overflow in `BytesMut::reserve`

RUSTSEC-2026-0007

In the unique reclaim path of BytesMut::reserve, the condition

if v_capacity >= new_cap + offset

uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB.

This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks.

PoC

use bytes::*;

fn main() {
    let mut a = BytesMut::from(&b"hello world"[..]);
    let mut b = a.split_off(5);

    // Ensure b becomes the unique owner of the backing storage
    drop(a);

    // Trigger overflow in new_cap + offset inside reserve
    b.reserve(usize::MAX - 6);

    // This call relies on the corrupted cap and may cause UB & HBO
    b.put_u8(b'h');
}

Workarounds

Users of BytesMut::reserve are only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.

time: Denial of Service via Stack Exhaustion

RUSTSEC-2026-0009

Impact

When user-provided input is provided to any type that parses with the RFC 2822 format, a denial of service attack via stack exhaustion is possible. The attack relies on formally deprecated and rarely-used features that are part of the RFC 2822 format used in a malicious manner. Ordinary, non-malicious input will never encounter this scenario.

Patches

A limit to the depth of recursion was added in v0.3.47. From this version, an error will be returned rather than exhausting the stack.

Workarounds

Limiting the length of user input is the simplest way to avoid stack exhaustion, as the amount of the stack consumed would be at most a factor of the length of the input.