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 webapp

Dependencies

(4 total, 2 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 diesel ⚠️^1.4.82.2.11out of date
 anyhow^1.0.511.0.98up to date
 serde^1.0.1471.0.219up to date
 toml^0.5.80.8.23out of date

Crate webapp-backend

Dependencies

(20 total, 10 outdated, 2 possibly insecure)

CrateRequiredLatestStatus
 actix^0.10.00.13.5out of date
 actix-cors^0.5.40.7.1out of date
 actix-files^0.5.00.6.6out of date
 actix-web^3.3.24.11.0out of date
 anyhow^1.0.511.0.98up to date
 bytes^1.1.01.10.1up to date
 clap^2.34.04.5.40out of date
 diesel ⚠️^1.4.82.2.11out of date
 env_logger^0.9.00.11.8out of date
 futures^0.3.250.3.31up to date
 jsonwebtoken^7.2.09.3.1out of date
 log^0.4.140.4.27up to date
 num_cpus^1.13.01.17.0up to date
 openssl ⚠️^0.10.380.10.73maybe insecure
 r2d2^0.8.90.8.10up to date
 serde^1.0.1471.0.219up to date
 serde_json^1.0.731.0.140up to date
 thiserror^1.0.302.0.12out of date
 url^2.2.22.5.4up to date
 uuid^0.8.21.17.0out of date

Dev dependencies

(4 total, 3 outdated)

CrateRequiredLatestStatus
 actix-http-test^2.1.03.2.0out of date
 actix-http^2.2.13.11.0out of date
 lazy_static^1.4.01.5.0up to date
 reqwest^0.11.70.12.22out of date

Crate webapp-frontend

Dependencies

(8 total, 3 outdated)

CrateRequiredLatestStatus
 anyhow^1.0.511.0.98up to date
 log^0.4.140.4.27up to date
 serde^1.0.1471.0.219up to date
 stdweb^0.4.200.4.20up to date
 thiserror^1.0.302.0.12out of date
 wasm-bindgen^0.2.780.2.100up to date
 yew^0.17.40.21.0out of date
 yew-router^0.16.00.18.0out of date

Build dependencies

(3 total, all up-to-date)

CrateRequiredLatestStatus
 anyhow^1.0.511.0.98up to date
 sass-rs^0.2.20.2.2up to date
 url^2.2.22.5.4up to date

Security Vulnerabilities

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.

openssl: Use-After-Free in `Md::fetch` and `Cipher::fetch`

RUSTSEC-2025-0022

When a Some(...) value was passed to the properties argument of either of these functions, a use-after-free would result.

In practice this would nearly always result in OpenSSL treating the properties as an empty string (due to CString::drop's behavior).

The maintainers thank quitbug for reporting this vulnerability to us.