MEDIUM 6.5

CVE-2026-56701: Grav XXE Vulnerability in SVG Upload – CVSS 6.5

Grav, a flat-file CMS, contains a vulnerability in how it processes SVG file uploads. An authenticated user can upload a specially crafted SVG file containing XML external entity (XXE) instructions. When the application parses this file, it reads and exfiltrates sensitive files from the server—such as configuration files, credentials, or other confidential data—without proper access controls. The flaw stems from the use of PHP's simplexml_load_string function without disabling external entity expansion, a well-known XML parsing pitfall.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weaknesses (CWE)
CWE-611
Affected products
0 configuration(s)
Published / Modified
2026-06-23 / 2026-06-23

NVD description (verbatim)

Grav before 2.0.0-beta.2 contains an XML external entity injection vulnerability in SVG file upload processing that allows authenticated attackers to read arbitrary files. The application uses simplexml_load_string without disabling external entity loading, enabling attackers to inject XXE payloads via malicious SVG files to exfiltrate sensitive data.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-56701 is an XML External Entity (XXE) injection vulnerability classified as CWE-611. It exists in Grav versions prior to 2.0.0-beta.2 within the SVG file upload processing pipeline. The vulnerability arises because simplexml_load_string is called without setting the appropriate LibXML options (such as LIBXML_NOENT and LIBXML_DTDLOAD disabled) to prevent external entity resolution. An authenticated attacker can craft a malicious SVG file with XXE payloads embedded in the XML declaration or DOCTYPE, causing the parser to resolve external entities and leak file contents via out-of-band channels or error messages. The attack requires authentication (PR:L in CVSS vector) but no user interaction beyond file upload.

Business impact

While the vulnerability requires authenticated access, it poses a significant confidentiality risk. An attacker with upload permissions—such as a compromised low-privilege user account or insider—can exfiltrate sensitive configuration files, database credentials, private keys, and other secrets stored on the server filesystem. This can lead to further compromise of infrastructure, lateral movement, or exposure of customer data. Organizations relying on Grav for content management should treat this as a priority issue if they allow multiple users with upload privileges.

Affected systems

Grav versions before 2.0.0-beta.2 are affected. The vulnerability is triggered specifically during SVG file upload and processing. Any installation that permits authenticated users to upload files is at risk. Verify your installed Grav version and audit which users have file upload permissions.

Exploitability

Exploitation requires valid authentication credentials and the ability to upload files—a functionality typically available to content editors and administrators. The attack is straightforward: upload a malicious SVG containing an XXE payload (e.g., defining an external entity that points to /etc/passwd or application configuration files) and retrieve the exfiltrated data. No special tools or zero-click vectors are involved. However, the requirement for prior authentication raises the barrier compared to unauthenticated XXE flaws. CISA has not flagged this vulnerability as known-exploited in the wild.

Remediation

Upgrade Grav to version 2.0.0-beta.2 or later. Developers should patch the SVG upload processing code to disable external entity resolution by configuring LibXML options appropriately before parsing XML. As an interim measure, restrict file upload permissions to trusted users only and implement strict file type validation (verifying MIME type and file extension for SVG uploads).

Patch guidance

Consult the official Grav repository and release notes to confirm the exact patch version available in your deployment track (stable, beta, or development). Apply version 2.0.0-beta.2 or any subsequent stable release that includes the fix. Test in a non-production environment first, as major version transitions may introduce breaking changes. After patching, validate that SVG file uploads no longer process external entities by testing with a benign XXE payload (do not use this in production without approval).

Detection guidance

Monitor application logs for failed XML parse operations or unusual error messages during file upload. Search for SVG uploads that contain DOCTYPE declarations, ENTITY definitions, or external URI references—red flags for XXE attempts. Implement file upload scanning to reject SVG files containing XML declarations with SYSTEM or PUBLIC identifiers. Network-based detection is challenging since the exploit is a direct file upload, but behavioral monitoring (e.g., unusual file access patterns post-upload, exfiltration attempts to external domains) may reveal active exploitation.

Why prioritize this

This vulnerability scores MEDIUM (6.5 CVSS) due to the confidentiality impact (High) balanced against the authentication requirement (PR:L). Prioritize patching based on your user access model: if many users have upload privileges, treat it as higher priority. Organizations with strict access controls limiting uploads to administrators can deprioritize slightly but should not ignore it, as account compromise or insider threats remain realistic scenarios. The lack of an active exploit in the wild provides some breathing room for methodical testing and rollout.

Risk score, explained

CVSS 3.1 score of 6.5 (MEDIUM) reflects a remotely exploitable flaw with low attack complexity and no user interaction required (from the attacker's perspective). The High confidentiality impact acknowledges the ability to read arbitrary files. However, the Local (L) privilege requirement—authentication—prevents this from being a Critical or High-severity issue. The vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) correctly emphasizes that while file exfiltration is possible, there is no integrity compromise or availability impact. Your risk assessment should also consider whether your user base includes potential threats and the sensitivity of files readable by the web server process.

Frequently asked questions

What file types are affected by this vulnerability?

Specifically SVG (Scalable Vector Graphics) files uploaded through Grav's file upload interface. SVG is XML-based, making it susceptible to XXE injection. Other image formats (PNG, JPEG, GIF) are not affected unless they are also processed via simplexml_load_string without external entity protections.

Can an attacker read files outside the web root?

Yes. The vulnerability allows reading of any file accessible to the web server process user. This typically includes configuration files in the application root, .env files with database credentials, and system files like /etc/passwd (on Linux). The attacker's read scope is limited only by file system permissions of the PHP process.

Do I need to do anything if I've restricted uploads to administrators only?

Your risk is reduced but not eliminated. Administrative accounts are high-value targets for phishing, credential theft, and social engineering. Additionally, a compromised admin account or malicious insider with upload privileges still poses a real threat. Patching remains the recommended safeguard.

How long has this vulnerability been exploitable in the wild?

As of the publication date (June 23, 2026), this vulnerability has not been added to CISA's Known Exploited Vulnerabilities (KEV) catalog, suggesting no widespread active exploitation has been documented. However, the simplicity of XXE exploitation means it could be weaponized quickly if disclosed widely.

This analysis is provided for informational purposes to assist security teams in vulnerability management and risk prioritization. While we endeavor to be accurate, information herein may be incomplete or subject to change as vendors release patches and security research evolves. Always verify patch version numbers, affected products, and remediation steps against official vendor advisories before deploying fixes in production. This vulnerability requires authentication; however, do not underestimate the risk posed by user account compromise or malicious insiders. SEC.co and its authors assume no liability for decisions made based on this intelligence. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).