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 mongodb

Dependencies

(38 total, 24 outdated, 5 possibly insecure)

CrateRequiredLatestStatus
 async-std^1.6.21.12.0up to date
 async-trait^0.1.240.1.79up to date
 base64^0.11.00.22.0out of date
 bitflags^1.1.02.5.0out of date
 bson^1.2.12.9.0out of date
 chrono ⚠️^0.4.70.4.37maybe insecure
 derivative^2.1.12.2.0up to date
 err-derive^0.2.30.3.1out of date
 futures^0.3.50.3.30up to date
 hex^0.4.00.4.3up to date
 hmac~0.7.10.12.1out of date
 lazy_static^1.4.01.4.0up to date
 md-5^0.8.00.10.6out of date
 os_info^3.0.13.8.2up to date
 pbkdf2^0.3.00.12.2out of date
 percent-encoding^2.0.02.3.1up to date
 rand^0.7.20.8.5out of date
 reqwest^0.10.60.12.2out of date
 rustls^0.17.00.23.4out of date
 serde^1.0.981.0.197up to date
 serde_bytes^0.11.50.11.14up to date
 serde_with^1.3.13.7.0out of date
 sha-1^0.8.10.10.1out of date
 sha2^0.8.00.10.8out of date
 socket2^0.3.120.5.6out of date
 stringprep^0.1.20.1.4up to date
 strsim^0.10.00.11.0out of date
 take_mut^0.2.20.2.2up to date
 time ⚠️^0.1.420.3.34out of date
 tokio ⚠️~0.2.181.37.0out of date
 tokio-rustls ⚠️^0.13.00.26.0out of date
 trust-dns-proto^0.19.40.23.2out of date
 trust-dns-resolver^0.19.50.23.2out of date
 typed-builder^0.4.00.18.1out of date
 uuid^0.8.11.8.0out of date
 version_check^0.9.10.9.4up to date
 webpki ⚠️^0.21.00.22.4out of date
 webpki-roots^0.18.00.26.1out of date

Dev dependencies

(6 total, 5 outdated)

CrateRequiredLatestStatus
 approx^0.3.20.5.1out of date
 derive_more^0.15.00.99.17out of date
 function_name^0.2.00.3.0out of date
 pretty_assertions^0.6.11.4.0out of date
 semver^0.9.01.0.22out of date
 serde_json^1.0.401.0.115up to date

Security Vulnerabilities

tokio-rustls: tokio-rustls reads may cause excessive memory usage

RUSTSEC-2020-0019

tokio-rustls does not call process_new_packets immediately after read, so the expected termination condition wants_read always returns true. As long as new incoming data arrives faster than it is processed and the reader does not return pending, data will be buffered.

This may cause DoS.

time: Potential segfault in the time crate

RUSTSEC-2020-0071

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

The affected functions from time 0.2.7 through 0.2.22 are:

  • time::UtcOffset::local_offset_at
  • time::UtcOffset::try_local_offset_at
  • time::UtcOffset::current_local_offset
  • time::UtcOffset::try_current_local_offset
  • time::OffsetDateTime::now_local
  • time::OffsetDateTime::try_now_local

The affected functions in time 0.1 (all versions) are:

  • at
  • at_utc
  • now

Non-Unix targets (including Windows and wasm) are unaffected.

Patches

Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.

Workarounds

A possible workaround for crates affected through the transitive dependency in chrono, is to avoid using the default oldtime feature dependency of the chrono crate by disabling its default-features and manually specifying the required features instead.

Examples:

Cargo.toml:

chrono = { version = "0.4", default-features = false, features = ["serde"] }
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }

Commandline:

cargo add chrono --no-default-features -F clock

Sources:

chrono: Potential segfault in `localtime_r` invocations

RUSTSEC-2020-0159

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

Workarounds

No workarounds are known.

References

tokio: Data race when sending and receiving after closing a `oneshot` channel

RUSTSEC-2021-0124

If a tokio::sync::oneshot channel is closed (via the oneshot::Receiver::close method), a data race may occur if the oneshot::Sender::send method is called while the corresponding oneshot::Receiver is awaited or calling try_recv.

When these methods are called concurrently on a closed channel, the two halves of the channel can concurrently access a shared memory location, resulting in a data race. This has been observed to cause memory corruption.

Note that the race only occurs when both halves of the channel are used after the Receiver half has called close. Code where close is not used, or where the Receiver is not awaited and try_recv is not called after calling close, is not affected.

See tokio#4225 for more details.

webpki: webpki: CPU denial of service in certificate path building

RUSTSEC-2023-0052

When this crate is given a pathological certificate chain to validate, it will spend CPU time exponential with the number of candidate certificates at each step of path building.

Both TLS clients and TLS servers that accept client certificate are affected.

This was previously reported in https://github.com/briansmith/webpki/issues/69 and re-reported recently by Luke Malinowski.

webpki 0.22.1 included a partial fix and webpki 0.22.2 added further fixes.