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 rsky-crypto

Dependencies

(4 total, 1 outdated)

CrateRequiredLatestStatus
 multibase^0.9.10.9.1up to date
 secp256k1^0.28.20.30.0out of date
 anyhow^1.0.791.0.94up to date
 p256^0.13.20.13.2up to date

Crate rsky-feedgen

Dependencies

(16 total, 4 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 rocket=0.5.10.5.1up to date
 serde^1.0.1601.0.216up to date
 serde_derive^1.01.0.216up to date
 serde_bytes^0.11.90.11.15up to date
 serde_ipld_dagcbor^0.3.00.6.1out of date
 serde_json^1.0.961.0.133up to date
 serde_cbor^0.11.20.11.2up to date
 diesel ⚠️=2.1.52.2.6out of date
 dotenvy^0.150.15.7up to date
 chrono^0.4.260.4.39up to date
 regex^1.8.41.11.1up to date
 base64^0.21.20.22.1out of date
 rand^0.8.50.8.5up to date
 once_cell^1.19.01.20.2up to date
 rocket_sync_db_pools=0.1.00.1.0up to date
 reqwest^0.110.12.9out of date

Dev dependencies

(3 total, 1 possibly insecure)

CrateRequiredLatestStatus
 tokio ⚠️^11.42.0maybe insecure
 temp-env^0.3.60.3.6up to date
 serial_test*3.2.0up to date

Crate rsky-firehose

Dependencies

(21 total, 5 outdated)

CrateRequiredLatestStatus
 ciborium^0.2.00.2.2up to date
 futures^0.3.280.3.31up to date
 tokio^1.28.01.42.0up to date
 tokio-tungstenite^0.18.00.26.0out of date
 url^2.3.12.5.4up to date
 chrono^0.4.240.4.39up to date
 derive_builder^0.12.00.20.2out of date
 miette^5.8.07.4.0out of date
 parking_lot^0.12.10.12.3up to date
 reqwest^0.11.160.12.9out of date
 serde^1.0.1601.0.216up to date
 serde_derive^1.01.0.216up to date
 serde_bytes^0.11.90.11.15up to date
 serde_ipld_dagcbor^0.6.10.6.1up to date
 serde_json^1.0.961.0.133up to date
 serde_cbor^0.11.20.11.2up to date
 thiserror^1.0.402.0.7out of date
 dotenvy^0.15.70.15.7up to date
 retry^2.0.02.0.0up to date
 anyhow^1.0.811.0.94up to date
 libipld^0.16.00.16.0up to date

Crate rsky-identity

Dependencies

(8 total, 1 outdated)

CrateRequiredLatestStatus
 anyhow^1.0.821.0.94up to date
 reqwest^0.12.30.12.9up to date
 serde_json^1.0.1151.0.133up to date
 urlencoding^2.1.32.1.3up to date
 thiserror^1.0.582.0.7out of date
 url^2.5.02.5.4up to date
 serde^1.0.1971.0.216up to date
 hickory-resolver^0.24.10.24.2up to date

Crate rsky-lexicon

Dependencies

(13 total, 5 outdated)

CrateRequiredLatestStatus
 chrono^0.4.240.4.39up to date
 derive_builder^0.12.00.20.2out of date
 miette^5.8.07.4.0out of date
 parking_lot^0.12.10.12.3up to date
 serde^1.0.1601.0.216up to date
 serde_json^1.0.961.0.133up to date
 serde_cbor^0.11.20.11.2up to date
 serde_derive^1.01.0.216up to date
 serde_bytes^0.11.90.11.15up to date
 thiserror^1.0.402.0.7out of date
 secp256k1^0.28.20.30.0out of date
 libipld^0.16.00.16.0up to date
 cid^0.10.10.11.1out of date

Crate rsky-pds

Dependencies

(55 total, 9 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 integer-encoding^34.0.2out of date
 tokio^1.28.21.42.0up to date
 rocket=0.5.10.5.1up to date
 dotenvy^0.150.15.7up to date
 diesel ⚠️=2.1.52.2.6out of date
 chrono^0.4.260.4.39up to date
 serde^1.0.1601.0.216up to date
 serde_repr^0.10.1.19up to date
 serde_derive^1.01.0.216up to date
 rand^0.8.50.8.5up to date
 email_address^0.2.40.2.9up to date
 anyhow^1.0.791.0.94up to date
 multibase^0.9.10.9.1up to date
 unsigned-varint^0.8.00.8.0up to date
 serde_cbor^0.11.20.11.2up to date
 base64^0.22.00.22.1up to date
 data-encoding^2.5.02.6.0up to date
 reqwest^0.12.30.12.9up to date
 serde_json^1.0.961.0.133up to date
 serde_ipld_dagcbor^0.6.10.6.1up to date
 serde_bytes^0.11.150.11.15up to date
 base64-url^2.0.23.0.0out of date
 secp256k1^0.28.20.30.0out of date
 rand_core^0.6.40.6.4up to date
 sha2^0.11.0-pre.30.10.8up to date
 indexmap^1.9.32.7.0out of date
 hex^0.4.30.4.3up to date
 libipld^0.16.00.16.0up to date
 libipld-cbor^0.16.00.16.0up to date
 lazy_static^1.4.01.5.0up to date
 regex^1.10.31.11.1up to date
 thiserror^1.0.402.0.7out of date
 aws-sdk-s3^1.29.01.65.0up to date
 aws-config^1.1.81.5.10up to date
 futures^0.3.280.3.31up to date
 jwt-simple^0.12.90.12.11up to date
 argon2^0.5.30.5.3up to date
 base64ct^1.6.01.6.0up to date
 mailgun-rs^0.1.101.0.0out of date
 mailchecker^6.0.16.0.14up to date
 image^0.25.10.25.5up to date
 infer^0.15.00.16.0out of date
 urlencoding^2.1.32.1.3up to date
 toml^0.8.120.8.19up to date
 rocket_ws^0.1.10.1.1up to date
 atrium-api^0.24.60.24.9up to date
 atrium-xrpc-client^0.5.80.5.10up to date
 ipld-core^0.4.10.4.1up to date
 time^0.3.360.3.37up to date
 url^2.5.22.5.4up to date
 async-event-emitter^0.1.30.1.3up to date
 event-emitter-rs^0.1.40.1.4up to date
 webpki-roots^0.26.0-alpha.10.26.7up to date
 cid^0.10.10.11.1out of date
 rocket_sync_db_pools=0.1.00.1.0up to date

Crate rsky-syntax

Dependencies

(6 total, all up-to-date)

CrateRequiredLatestStatus
 anyhow^1.0.861.0.94up to date
 lazy_static^1.5.01.5.0up to date
 regex^1.10.51.11.1up to date
 serde^1.0.1601.0.216up to date
 serde_derive^1.01.0.216up to date
 url^2.5.22.5.4up to date

Security Vulnerabilities

tokio: reject_remote_clients Configuration corruption

RUSTSEC-2023-0001

On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.

This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.

The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.

Workarounds

Ensure that pipe_mode is set first after initializing a ServerOptions. For example:

let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);

diesel: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts

RUSTSEC-2024-0365

The following presentation at this year's DEF CON was brought to our attention on the Diesel Gitter Channel:

SQL Injection isn't Dead: Smuggling Queries at the Protocol Level
http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf
(Archive link for posterity.) Essentially, encoding a value larger than 4GiB can cause the length prefix in the protocol to overflow, causing the server to interpret the rest of the string as binary protocol commands or other data.

It appears Diesel does perform truncating casts in a way that could be problematic, for example: https://github.com/diesel-rs/diesel/blob/ae82c4a5a133db65612b7436356f549bfecda1c7/diesel/src/pg/connection/stmt/mod.rs#L36

This code has existed essentially since the beginning, so it is reasonable to assume that all published versions <= 2.2.2 are affected.

Mitigation

The prefered migration to the outlined problem is to update to a Diesel version newer than 2.2.2, which includes fixes for the problem.

As always, you should make sure your application is validating untrustworthy user input. Reject any input over 4 GiB, or any input that could encode to a string longer than 4 GiB. Dynamically built queries are also potentially problematic if it pushes the message size over this 4 GiB bound.

For web application backends, consider adding some middleware that limits the size of request bodies by default.

Resolution

Diesel now uses #[deny] directives for the following Clippy lints:

to prevent casts that will lead to precision loss or other trunctations. Additionally we performed an audit of the relevant code.

A fix is included in the 2.2.3 release.