Skip to main content

Grav API Plugin EUVDEUVD-2026-42905

| CVE-2026-61456 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-10 VulnCheck GHSA-g78v-pr5g-35v2
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain api.media.write API credentials
  2. Delivery
    Upload SVG with embedded JS payload via POST /api/v1/media
  3. Exploit
    Server stores unmodified SVG
  4. Execution
    Induce administrator to open stored SVG URL
  5. Persist
    JavaScript executes in admin browser session
  6. Impact
    Exfiltrate session cookie to attacker endpoint

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 the attacker to hold a Grav API account with the api.media.write permission explicitly granted - this permission controls write access to the /api/v1/media endpoint and is not a default or low-barrier condition. Beyond the authenticated upload step, successful exploitation further requires passive user interaction (CVSS UI:P): an administrator must open the malicious SVG file in a browser, either by navigating to its URL directly or by loading a page that embeds it via an <object> or <iframe> element. Exploitation is limited to versions of grav-plugin-api prior to 1.0.3, and only affects deployments where the Grav API plugin is installed and active. The two combined limiting factors - pre-authenticated API access with specific write permissions and administrator browser interaction - substantially reduce the realistic attack surface compared to unauthenticated or no-interaction vulnerabilities.

Impact

The CVSS 4.0 score of 5.1 (Medium) is consistent with the attack's realistic constraints. The vector PR:L confirms that an authenticated user with the api.media.write permission is required - unauthenticated exploitation is not possible. UI:P reflects that administrator interaction (opening the SVG in a browser) is a necessary precondition, adding a social engineering dependency. No EPSS score was provided; no KEV listing exists and no public exploit or POC has been identified at time of analysis. The combination of these factors means real-world risk is moderate and largely dependent on two limiting conditions: (1) whether the api.media.write permission is granted to potentially untrusted or compromised accounts, and (2) whether an administrator can be induced to open attacker-uploaded media files. The impact ceiling - session hijacking of an admin account - is meaningfully high if both conditions are met, making this a priority for sites where the API is exposed to external or low-trust authenticated users. The CVSS 4.0 scope metrics (SC:N/SI:N/SA:N) indicate impact is confined to the vulnerable Grav system and does not cascade to other services.

Exploit ScenarioDerived

An attacker with api.media.write API access crafts an SVG file embedding a JavaScript payload such as a fetch() call that exfiltrates document.cookie to an attacker-controlled endpoint, then uploads it via a POST request to /api/v1/media. The attacker then sends a Grav administrator a link to the stored SVG file (e.g., in a support ticket, internal message, or by embedding it in a public Grav page via an <object> tag) and waits for the administrator to open it; upon browser rendering, the embedded script executes in the admin's origin context and transmits the session token, granting the attacker full administrative access to the Grav installation. No public POC has been identified, but the technique is well-understood and straightforward for any attacker familiar with SVG-based XSS.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 10, 2026

Stored XSS in the Grav API plugin (getgrav/grav-plugin-api) before version 1.0.3 allows an authenticated attacker holding the api.media.write permission to upload a malicious SVG file that executes arbitrary JavaScript in an administrator's browser session. The POST /api/v1/media endpoint's HandlesMediaUploads::processUploadedFile() method validates only the file extension and never calls Security::sanitizeSVG(), so the uploaded file is stored and served verbatim with Content-Type: image/svg+xml. When an administrator opens the file directly or via an embedded object or iframe, the injected script runs in the admin's authenticated session context, enabling cookie theft and full session hijacking. No public exploit or active exploitation has been identified at time of analysis.

RemediationAI

Upgrade grav-plugin-api to version 1.0.3 or later, which corrects the vulnerability by invoking Security::sanitizeSVG() in the processUploadedFile() method. The vendor advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-7vhm-8x52-2r5p. If immediate upgrade is not possible, restrict the api.media.write permission to only the most trusted, internally managed accounts, eliminating the ability for external or low-privilege users to upload media via the API endpoint. As a secondary compensating control, configure the web server (nginx or Apache) to override the content type for SVG files in the media upload directory, serving them as application/octet-stream or text/plain rather than image/svg+xml; this prevents browser execution of embedded scripts but may break legitimate SVG rendering for users. Note that the content-type override workaround has a trade-off: it will affect all SVG media served from that path, including legitimate files, and does not prevent malicious file storage - it only blocks in-browser execution.

Affected VersionsENISA

grav 0 <1.0.3

Affected Packages

euvd grav fix: 1.0.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Grav is a flat-file CMS that offers an optional REST API via the grav-plugin-api package. The affected endpoint, POST /api/v1/media, delegates file handling to the HandlesMediaUploads trait's processUploadedFile() method, which performs only a file-extension check rather than invoking Grav's built-in Security::sanitizeSVG() sanitization utility. The SVG image format (XML-based) natively supports embedded ECMAScript via <script> tags and event handlers; when a browser fetches such a file served with the image/svg+xml content type, it executes the embedded JavaScript in the context of the serving origin. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation - Stored XSS): untrusted content is persisted server-side and later rendered in a privileged browser context without sanitization. The CPE provided (cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*) identifies the Grav ecosystem broadly; the specific vulnerable component is the API plugin, versions prior to 1.0.3.

Know when Grav 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

Vendor (VulnCheck) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.4 MEDIUM

Network vector via API upload, low privilege (api.media.write account), user interaction required (admin opens SVG), scope changes as script executes in admin browser context, limited C and I impact from session theft.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 10, 2026 - 16:16 EUVD

DescriptionCVE.org

The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 fails to sanitize SVG files uploaded through the POST /api/v1/media endpoint. The HandlesMediaUploads::processUploadedFile() method validates only the file extension and never invokes Security::sanitizeSVG(), so an authenticated attacker with the api.media.write permission can upload an SVG containing arbitrary JavaScript. The file is stored unmodified and served with Content-Type: image/svg+xml; when an administrator opens it in a browser (directly or via <object>/<iframe>), the embedded script executes in their session context, enabling cookie theft and session hijacking.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Low
niche flat-file CMS, API plugin is optional add-on
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Grav

View all
CVE-2025-66294 HIGH POC
8.7 Dec 01

Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol

CVE-2025-66301 HIGH POC
8.6 Dec 01

Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their

CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66844 CRITICAL POC
9.1 Dec 15

Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make

CVE-2025-66299 HIGH POC
8.8 Dec 01

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy