moonshine/moonshine is vulnerable to Unrestricted Upload of File with Dangerous Type
88
High Risk
MoonShine's FileModelApply::store() re-checks the MIME-derived extension of an uploaded file but never validates the extension of the final stored filename when a File/Image field uses keepOriginalFileName() or a customName() callback. A file detected as an allowed type, such as an image, can be persisted under a disallowed executable extension such as .php by controlling the original or custom filename, bypassing an explicitly configured allowedExtensions() list. On a deployment where the storage disk is web-accessible and the server executes the stored file type, this leads to remote code execution. The fix validates the extension of the actual stored name via storeAs() before saving.
You are affected if you are using a version that falls within the vulnerable range and you use a File or Image field with keepOriginalFileName() or a customName() callback that can produce an extension from untrusted input.
moonshine/moonshine is vulnerable to Unrestricted Upload of File with Dangerous Type in versions 1.21.0 - 3.18.0 and 4.0.0 - 4.18.1.
Upgrade the moonshine/moonshine library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

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.