Repository navigation
fix(deps): bump ammonia to 4.2.5 for RUSTSEC-2026-0533 - #147
Merged
Merged
Conversation
cargo deny failed on main's push run for #144 (43475094189), and the gate with it, on this advisory (mutation XSS through embedded SVG and MathML, dated 2026-11-12, patched in ammonia >= 4.2.5 for the 4.2 line). ammonia is the sanitiser behind thrust-editor-doc's description_html; thrust-api-v1, thrust-compat-plane and thrust-editor-worker reach it through the `sanitize` feature. The manifest already allows 4, so this is a lockfile change only: ammonia 4.2.4 -> 4.2.5, its version and checksum, nothing else. `cargo update` also moved tempfile's getrandom from 0.4.3 to 0.3.4; that hunk is not part of this change and was put back by hand (`cargo metadata --locked` accepts the result). Checked: - cargo deny 0.20.2 (CI's version, `--locked check`): the lockfile on main fails on RUSTSEC-2026-0533 alone; this one passes advisories, bans, licenses and sources. - cargo nextest run --workspace --profile ci: 3564 passed, 4 skipped (the oracle_ tests the profile excludes), the three sanitiser tests among them. - examples/sanitize_check over the 125 XSS payloads and the editor corpus (431 inputs): the sanitiser's output (plain, stripped and hardened) is byte-identical on 4.2.4 and 4.2.5. Control: 4.0.0 (probes/ammonia-400) differs from 4.2.4 on 7 of the same inputs, so the comparison can see this kind of change. Not shown: that the fix does anything for this configuration. The output does not change on any corpus input, so the corpus does not exercise it; the allow-list adds no math, svg or raw-text tag to ammonia's defaults, so by the advisory's own text this code should not have been affected. Not tested with the advisory's payload. The doctests were not run locally; CI runs them. probes/ammonia-400 still pins =4.0.0 on purpose: a separate workspace with its own lock, never shipped, outside cargo deny's reach. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo denyis red onmain, and thegatewith it, on RUSTSEC-2026-0533 (mutation XSS through embedded SVG and MathML inammonia, dated 2026-11-12). It first showed in the push run for #144, where it was the only failing check besides thegatethat reports it. The advisory lists>= 4.2.5as patched for the 4.2 line, and this takes the lockfile from 4.2.4 to 4.2.5.What changes
Cargo.lock, two lines:ammonia4.2.4 to 4.2.5, its version and checksum. The manifest already allows4.ammoniais the sanitiser behindthrust-editor-doc'sdescription_html;thrust-api-v1,thrust-compat-planeandthrust-editor-workerreach it through thesanitizefeature.cargo updatealso movedtempfile'sgetrandomfrom 0.4.3 to 0.3.4, with the same result under the Homebrew cargo 1.98.1 and rustup's 1.99.0. That is not part of this change, so I put the hunk back by hand;cargo metadata --lockedaccepts the lockfile.Checked
cargo deny 0.20.2 --locked check(CI's version and flags), lockfile ofmainadvisories FAILED, bans ok, licenses ok, sources ok)cargo nextest run --workspace --profile ci --lockedoracle_tests the profile excludes); the three sanitiser tests ranexamples/sanitize_checkover the 125 XSS payloads and the editor corpus (431 inputs), 4.2.4 against 4.2.5probes/ammonia-400) against 4.2.4Not shown
mention-component,label,inputandimage-componentto ammonia's defaults and nomath,svgor raw-text tag, and the advisory says applications that allow none of those "should not be affected". That is the advisory's claim; I did not test the advisory's payload.Left alone
probes/ammonia-400pins=4.0.0, which the advisory does not list as patched. It is a separate workspace with its own lock, built only by itsrun.shto measure the engine inside Plane'snh3, never shipped, and outside what the rootcargo denysees.🤖 Generated with Claude Code