Skip to content

Update lettre, url, quinn, sqlx and parquet for their RustSec advisories - #937

Merged
schmitch merged 2 commits into
mainfrom
schmitch/elegant-gates-mvqubk
Dec 2, 2026
Merged

schmitch merged 2 commits into
mainfrom
schmitch/elegant-gates-mvqubk

Conversation

@schmitch

@schmitch schmitch commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Clears the twelve RustSec advisories that fail cargo audit on main (the audit job of #927's run, and the daily Audit workflow's runs). Cargo.lock and .cargo/audit.toml change, and no Cargo.toml; one test of forge-db follows sqlx 0.9.1 (below).

Advisories

Crate Advisories Fix In Forge
lettre 0.11.23 RUSTSEC-2026-0560 to -0565: forged replies after STARTTLS, SMTP command injection after a bare LF, quoted local part sent to another address, memory exhaustion and panics from a hostile server → 0.11.25 the SMTP client of outgoing mail
url 2.5.8 RUSTSEC-2026-0592: stack overflow in Url::origin() on nested blob: URLs → 2.5.9 (with form_urlencoded 1.2.3) origin() is called on administrator-entered URLs and the base URL only
quinn-proto 0.11.18 RUSTSEC-2026-0523, -0524 → 0.11.19 lockfile only: no feature of the workspace compiles QUIC
quinn-udp 0.5.15 RUSTSEC-2026-0538 → 0.5.16 lockfile only
libsqlite3-sys 0.30.1 RUSTSEC-2026-0459 (SQLite before 3.54.0) → 0.40.0, which sqlx 0.9.1 allows (0.9.0 capped it below 0.38) lockfile only: sqlx-sqlite is not compiled
curve25519-dalek 4.1.3 RUSTSEC-2026-0620: wrong scalar multiplication in the AVX-512 backend accepted in .cargo/audit.toml not affected, see below

parquet and parquet_derive move from 60.1.0 to 60.2.0 as well, which clears the unsound warning RUSTSEC-2026-0595 (bloom filters in encrypted files; Forge writes none).

The one accepted advisory

curve25519-dalek is fixed in 5.1.0 only, and rPGP (pgp 0.21.1, the newest) needs 4.x, as do ed25519-dalek 2 and x25519-dalek 2. In 4.0.0 to 4.1.3 the AVX-512 backend is compiled only by a nightly rustc (#[cfg(nightly)], set by the crate's build.rs from the compiler's channel). Forge is built with the pinned stable toolchain (rust-toolchain.toml, the Dockerfile's rust:1.99.1), which compiles the AVX2 and serial backends; the advisory names neither. The entry in .cargo/audit.toml says so, and goes once rPGP moves to curve25519-dalek 5.

What stays

Three unmaintained warnings remain. They do not fail cargo audit, and none has a release to move to:

  • chrono and chrono-tz (RUSTSEC-2026-0543, -0555): used across the workspace, and by sqlx, parquet and croner. Leaving them means moving to jiff or time, a change of its own.
  • astral-tokio-tar (RUSTSEC-2026-0440): a dependency of testcontainers (tests only), whose newest release, 0.28.0, still uses it.

Behaviour changes that come with the updates

  • lettre 0.11.24 refuses addresses with non-ASCII white space or control characters, fails the connection when a server sends anything between its STARTTLS reply and the TLS handshake, and fails a send whose DATA reply is not of the expected class.
  • url 2.5.9: a blob: URL whose inner URL is not http, https or file has an opaque origin.
  • sqlx 0.9.1 rolls back a transaction whose caller is dropped while Postgres answers the BEGIN (launchbadge/sqlx 4394), the fault forge_db::begin works around (CI: a killed Nexus import resumed to "completed" with one of its packages missing (nexus_import test failed on main) #570). crates/db/tests/begin.rs asserted that Pool::begin still had it, to tell when a release fixes it, and failed with the new lockfile. It now asserts that neither forge_db::begin nor Pool::begin leaves a transaction open, and the doc comment of forge_db::begin says which releases had the fault. forge_db::begin stays: it is still correct, and replacing its 70 callers is a change of its own. The one direct pool.begin() outside the tests (crates/server/src/traffic/maxmind.rs) is safe with this release.
  • sqlx 0.9.1 also reads hostaddr in a database URL as libpq does (the address to connect to, with host still naming the server for TLS) instead of as an alias of host, and sets TCP_NODELAY on its sockets. Nothing in Forge or its documentation uses hostaddr.

Verification

  • cargo audit 0.22.2 (CI's pin) on the new lockfile: no vulnerability, the three warnings above.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo fmt --all --check and cargo xtask changelog --check pass.
  • cargo test -p forge-server --test email --test email_oauth --test invitations --test traffic passes: mail goes out over STARTTLS and implicit TLS to a real SMTP server (mailpit), with and without AUTH.
  • cargo test -p forge-db -p forge-traffic passes, tests/begin.rs nine times in a row (six failing before its change, three passing after).
  • The rest of the suite, and the .sqlx drift guard against sqlx 0.9.1, are left to this pull request's CI.

Notes

https://claude.ai/code/session_012e6DJY4xSPLWVHnr546DHR


Generated by Claude Code

cargo audit failed on main with twelve advisories. The lockfile moves to
the fixed releases:

- lettre 0.11.23 -> 0.11.25 (RUSTSEC-2026-0560 to -0565), the SMTP
  client of outgoing mail: forged replies after STARTTLS, command
  injection after a bare LF, a quoted local part sent to another address,
  memory exhaustion and panics from a hostile server.
- url 2.5.8 -> 2.5.9 (RUSTSEC-2026-0592): stack overflow in
  Url::origin() on nested blob: URLs.
- quinn-proto 0.11.18 -> 0.11.19 and quinn-udp 0.5.15 -> 0.5.16
  (RUSTSEC-2026-0523, -0524, -0538), and libsqlite3-sys 0.30.1 -> 0.40.0
  (RUSTSEC-2026-0459), which sqlx 0.9.1 allows: lockfile entries of
  features the workspace does not compile.
- parquet and parquet_derive 60.1.0 -> 60.2.0, which clears the unsound
  warning RUSTSEC-2026-0595.

curve25519-dalek 4.1.3 (RUSTSEC-2026-0620) is accepted in
.cargo/audit.toml: the fix is in 5.1.0 only, rPGP needs 4.x, and the
faulty AVX-512 backend is compiled by a nightly rustc alone, while Forge
is built with the pinned stable toolchain.

Three unmaintained warnings stay (chrono, chrono-tz, astral-tokio-tar);
they do not fail the audit and have no release to move to.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJY4xSPLWVHnr546DHR
tests/begin.rs asserted that sqlx's own Pool::begin leaves a transaction
open when its caller is dropped while Postgres answers the BEGIN, to tell
when a sqlx release fixes it. sqlx 0.9.1 does (it counts the transaction
before the round trip), so the assertion failed with the updated
lockfile.

The test now asserts that neither forge_db::begin nor Pool::begin leaves
one, and the doc comment of forge_db::begin says which sqlx releases had
the fault. forge_db::begin itself stays: it is still correct, and
replacing its 70 callers is a change of its own.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012e6DJY4xSPLWVHnr546DHR
@schmitch
schmitch enabled auto-merge December 2, 2026 16:14
@schmitch
schmitch added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 2635724 Dec 2, 2026
20 checks passed
@schmitch
schmitch deleted the schmitch/elegant-gates-mvqubk branch December 2, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants