silverstripe/assets is vulnerable to Unrestricted Upload of File with Dangerous Type
85
CVE Score
High
Unrestricted Upload of File with Dangerous Type
Before the fix, a signed-in CMS user who could edit a file record could clear its Name and set Title to something like shell.php; onBeforeWrite resolved the filename from Title, and updateFilesystem copied the stored file to that path without re-checking the extension, writing a disallowed PHP file into the public assets directory where the web server could execute it. The flaw shipped from the first 1.0.0 release through 2.4.5. The fix re-validates the resolved path against the allowed-extension list before the copy, throws a ValidationException instead, and hardens the generated .htaccess to deny executing uploaded scripts.
Upgrade the silverstripe/assets package to 2.4.6 or later.
You are affected if you are using a version that falls within the vulnerable range and let CMS users who can edit or upload files rename an asset so its stored file gains a disallowed executable extension.
1.0.0 - 2.4.5
Fixed in 2.4.6silverstripe/assets is vulnerable to Unrestricted Upload of File with Dangerous Type in versions 1.0.0 - 2.4.5.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.