fix(deps): bump url to 2.5.9 for RUSTSEC-2026-0592 (#9877)

## Summary

Bumps `url` from 2.5.8 to 2.5.9 in the root `Cargo.lock` so the CI
**Security** job (`cargo-deny check`) passes again.

**What failed.** `Security Domain / Security` fails with `advisories
FAILED` on one error:
[RUSTSEC-2026-0592](https://rustsec.org/advisories/RUSTSEC-2026-0592),
"Stack overflow in `Url::origin()` on nested `blob:` URLs", against `url
2.5.8`. The advisory's fix is `url >= 2.5.9`.

**Why it is not tied to any one PR.** The advisory was published after
the last green `main` run (80131055dc, 2026-11-21). Since then the job
fails the same way on `main` itself (d29c679066, 42dc2a8c58, e03a11f929,
10dd70f152) and on every PR whose changes select the Rust lanes,
whatever the PR changes.

**The change.** `cargo update -p url --precise 2.5.9`:

| Package | Before | After |
|---|---|---|
| `url` | 2.5.8 | 2.5.9 |
| `form_urlencoded` | 1.2.2 | 1.2.3 |

`url` 2.5.9 requires `form_urlencoded` 1.2.3, so two packages is the
smallest lockfile change that resolves. No manifest changes, and no
ignore added to `deny.toml`.

**`desktop/src-tauri/Cargo.lock` is not changed.** It also pins `url`
2.5.8, but CI does not scan it: the Security job runs `cargo-deny check`
at the repository root only, so it is not part of this failure. I left
it for a separate change because touching `desktop/` adds the desktop
JavaScript and Tauri lanes to a PR whose purpose is to unblock `main`,
and I did not build that bump. The same command with `--manifest-path
desktop/src-tauri/Cargo.toml` moves the same two packages (dry run). The
0.X desktop app does call `Url::origin()` on parsed URLs without first
checking the scheme (`link_preview_tags.rs`,
`commands/personas/card.rs`, `relay/profile_avatar.rs`). The inputs I
traced come from the app's own frontend and the user's own agent
profiles; I did not trace every path.

**Behavior change in `url` 2.5.9.** `Url::origin()` on a `blob:` URL now
takes the inner URL's origin only when the inner scheme is `http`,
`https` or `file`; otherwise the origin is opaque. Before, a `blob:` URL
wrapping `ws`, `wss` or `ftp` had a tuple origin.

- Root workspace: one caller, `StrictWorkspace::validate_endpoint` in
`crates/buzz-agent/src/databricks.rs`. Both URLs it compares must start
with `https://`, so a `blob:` URL never reaches `origin()` there.
Nothing depends on the old result.
- No other crate in the root lockfile calls `Url::origin()`: not the
registry crates that depend on `url`, nor the git dependencies
(mesh-llm, sqlx, rust-s3).
- The release also changes parsing outside `origin()`: `^` in a path is
now percent-encoded (`/a^b` becomes `/a%5Eb`), a backslash ends a port
only for special schemes, host handling for `file:` URLs with a
drive-letter path changes, and a quadratic case in `..` handling is
fixed. `form_urlencoded` 1.2.3 clamps an out-of-range start position
where it panicked before. I read these from the crate diffs and did not
audit them against every caller.

**Out of scope.** The other `cargo-deny` output (yanked `async-executor`
and `nostr-sdk`, the unused RUSTSEC-2026-0381 ignore) is warnings. It is
the same before and after this change and does not fail the job.

### Related issue

N/A. No open PR fixes this: I searched open PRs for the advisory ID,
"url 2.5.9", "cargo update -p url", "cargo deny" and dependency
branches. #9874 only mentions the failure in its description.

### Testing

Run locally on macOS, on this branch (10dd70f152 plus the one commit):

- `./bin/cargo-deny check` (cargo-deny 0.19.0, the command the Security
job runs): exit 0, `advisories ok, bans ok, licenses ok, sources ok`.
With `main`'s lockfile restored: exit 1, `advisories FAILED` on that one
error.
- `cargo check --workspace --all-targets --locked --exclude buzz-voice`
(cargo 1.98.1): finished with no errors or warnings. `buzz-voice` is
excluded because its `sherpa-onnx-sys` build script downloads an archive
that fails TLS verification on the workstation used.
- `cargo test --locked -p buzz-core -p buzz-auth -p buzz-agent --lib`:
299, 291 and 550 passed, 0 failed, 1 ignored. These crates hold the
`origin()` caller and the relay URL and NIP-98 URL normalization.

Not run: the rest of the unit suite, the Postgres lane, the relay e2e
binaries, clippy, and the desktop, web and mobile lanes. The branch was
pushed with `--no-verify`, so the local pre-push lanes did not run
either. CI on this PR is the first full run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Matt Toohey
2026-11-24 04:18:28 +11:00
committed by GitHub
parent aa5fa129c4
commit c5d480427b

8
Cargo.lock generated
View File

@@ -3333,9 +3333,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
version = "1.2.2"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e"
dependencies = [
"percent-encoding",
]
@@ -11410,9 +11410,9 @@ dependencies = [
[[package]]
name = "url"
version = "2.5.8"
version = "2.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a"
dependencies = [
"form_urlencoded",
"idna",