VDB
Sign up
MEDIUM6.1

GHSA-f6rx-hf55-4255

Sulu vulnerable to XXE in SVG File upload Inspector

Quick fix

GHSA-f6rx-hf55-4255 — sulu/sulu: upgrade to the fixed version with the command below.

composer require sulu/sulu:^2.5.25

Details

### Impact

A admin user can upload SVG which may load external data via XML DOM library, specially this can be used for eventually reference none secure XML External Entity References.

### Patches

The problem has not been patched yet. Users should upgrade to patched versions once they become available. Currently affected versions are:

- 2.6.9 - 2.5.25 - 3.0.0-alpha3

### Workarounds

Patch the effect file `src/Sulu/Bundle/MediaBundle/FileInspector/SvgFileInspector.php` in sulu with:

```diff -$dom->loadXML($svg, \LIBXML_NOENT | \LIBXML_DTDLOAD); +$dom->loadXML($data, LIBXML_NONET); ```

### References

- GitHub repository: https://github.com/sulu/sulu - Vulnerable code: https://github.com/sulu/sulu/blob/2.6/src/Sulu/Bundle/MediaBundle/FileInspector/SvgFileInspector.php

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/sulu/sulu
Introduced in: 2.5.21Fixed in: 2.5.25
Fixcomposer require sulu/sulu:^2.5.25
Packagist/sulu/sulu
Introduced in: 2.6.5Fixed in: 2.6.9
Fixcomposer require sulu/sulu:^2.6.9
Packagist/sulu/sulu
Introduced in: 3.0.0-alpha1Fixed in: 3.0.0-alpha3
Fixcomposer require sulu/sulu:^3.0.0-alpha3

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:composer/sulu/sulu"]}'