fix(web): block SVG from media relay - #41494
Conversation
Verification: SVG removed from media relay allowlistConfirmed the security rationale and the fix: The risk: SVG files can embed The fix: Removes Test: Verifies that requesting an Clean, minimal, correct. No false positives — legitimate SVG use cases (e.g., icon libraries) don't need server-side media relay. |
|
Thanks for the focused security hardening. Current main still maps The linked maintainer comment on #2690 explicitly identifies this media-relay scope as the intended narrow SVG mitigation, while preserving SVG support in the vision path. The added regression test is appropriately colocated with the existing Automated hermes-sweeper review. |
Summary
/api/mediafrom relaying SVG files as image data URLsSecurity impact
The media relay is intended for gateway-local generated media. SVG is active content in several browser contexts, so this endpoint now serves inert raster/icon formats only.
Tests
uv run --with pytest python -m pytest -o addopts='' tests/hermes_cli/test_web_server.py -k get_mediapython -m py_compile hermes_cli/web_server.py