Closed (fixed)
Project:
Svg Image
Version:
3.2.4
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2026 at 21:15 UTC
Updated:
23 Oct 2026 at 07:45 UTC
Jump to comment: Most recent
SVG Image requires enshrined/svg-sanitize >=0.15 <1.0, but enshrined/svg-sanitize is listed on several security advisories and this prevents a clean install of SVG Image.
Running `composer require drupal/svg_image` on a clean Drupal installation aborts:
- Root composer.json requires drupal/svg_image ^3.2 -> satisfiable by drupal/svg_image[3.2.0, ..., 3.x-dev].
- drupal/svg_image[3.2.0, ..., 3.2.1] require enshrined/svg-sanitize >=0.15 <1.0 -> found enshrined/svg-sanitize[0.15.0, ..., 0.22.0] but these were not loaded, because they are affected by security advisories ("PKSA-8j6w-3kr7-s9xk", "PKSA-6j95-1jtb-x6wc", "PKSA-cbx2-m9db-bmzd", "PKSA-4g5g-4rkv-myqs"). Go to https://packagist.org/security-advisories/ to find advisory details. To ignore the advisories, add their IDs to the "policy.advisories.ignore-id" config or add the package to "policy.advisories.ignore". To turn the feature off entirely, you can set "policy.advisories.block" to false.
There is no significant change in enshrined/svg-sanitize ^1.0, so increase the require to ^1.0
Refactor composer.json:
…
"require": {
"enshrined/svg-sanitize": "^1.0"
}None
None
None
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
drupal-son commentedSame issue
Comment #3
greatmatter commentedThank you for this! Looking forward to the release.
Comment #5
andre.bononHi, I noticed that the merge request hasn't been created yet. As the code looks good to me, I've just created the merge request.
Comment #6
murrow commentedOops, thank you, andre.bonon. My bad
Comment #7
jurgenhaasChanging this to critical. I hope there can be a quick patch release with the MR being merged.
Comment #8
eduardo morales alberti+1 to it
Comment #9
vitaliyb98 commented+1, looking forward
Comment #10
aporie+1 too
Comment #11
lmoeni+1
Comment #12
mably commentedThanks all. I compared enshrined/svg-sanitize 0.22.0 and 1.0.0: no public method was removed or changed, and svg_image only calls
(new Sanitizer())->sanitize()with the defaults. The only behaviour change on that path is that DOCTYPE/DTD blocks are now always stripped, which is the XSS fix itself, so !65 is safe as is.The failing phpstan job is unrelated (the private
$loggerin SvgResponsiveImageFormatter, #3562651). I'll merge both and tag a release shortly.AI-Generated: Yes (Claude Code was used to compare the two library versions and to help draft this comment. I reviewed it.)
Comment #13
steveoriol+1
Comment #15
mably commentedMerged. Thanks everybody!
Comment #17
mably commented3.2.5 has been released with the fix.