GitHub Advisoryadvisory · Packagist
GHSA-qp29-wcc2-vmpc Silverstripe HtmlEditor embed url sanitisation
MEDIUM
Official page ↗
- Ecosystem
- Packagist
- Packages
- silverstripe/framework
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Reviewed
- 2024-05-23
Affected packages
• Packagist silverstripe/framework: >= 3.0.0, < 3.2.1 → fixed in 3.2.1
Description
"Add from URL" doesn't clearly sanitise URL server side
HtmlEditorField_Toolbar has an action HtmlEditorField_Toolbar#viewfile, which gets called by the CMS when adding a media "from a URL" (i.e. via oembed).
This action gets the URL to add in the GET parameter FileURL. However it doesn't do any URL sanitising server side. The current logic will pass this through to Oembed, which will probably reject most dangerous URLs, but it's possible future changes would break this.