/

CVE-2026-126306

Severity:

HIGH RISK

(8.0)

Stored XSS (CWE-79) in EspoCRM SVG Image Upload Feature

CVE-2026-126306

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Authenticated administrator actions, including potential privilege escalation

Severity:

HIGH RISK

(8.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

EspoCRM has a stored cross-site scripting vulnerability involving crafted SVG images uploaded by low-privileged users. If an administrator opens an uploaded SVG in a separate browser tab and clicks it while authenticated, it may submit requests to backend endpoints and perform actions available to that administrator.

Affected context

The issue affects EspoCRM deployments with the vulnerable SVG image upload behavior. Risk arises when a low-privileged user can upload a crafted SVG and an administrator later opens that image in a separate browser tab and interacts with it while signed in.

Exploit preconditions

  • Attack surface: SVG image upload and subsequent viewing in a browser
  • Required access: A low-privileged account able to upload crafted SVG files
  • Trigger point: An administrator opens the uploaded SVG in a separate tab and clicks it
  • Why exploitation is possible: The SVG can cause authenticated POST requests to backend endpoints, allowing actions within the administrator's permissions

Why this happens

SVG files can contain active content, and treating uploaded SVGs as inert images without adequately sanitizing or isolating them can allow script-driven behavior in a browser. This is a stored cross-site scripting issue mapped to CWE-79: Improper Neutralization of Input During Web Page Generation. The vulnerable content is stored and later interpreted in a context where it can act using an authenticated user's session.

Potential impact

  • An attacker may cause authenticated backend requests when an administrator interacts with the uploaded SVG
  • Administrator-permitted actions could be performed without the administrator intending them
  • An attacker could potentially elevate their account's privileges if the relevant administrative action is available
  • Other data or configuration changes within the administrator's permissions could occur

General mitigation guidance

Defensive patterns focus on preventing uploaded SVG content from executing in a trusted application context.

  • Prefer rejecting SVG uploads or converting them to a safe raster format when vector functionality is not essential
  • If SVG support is required, apply robust allowlist-based sanitization and serve files from an isolated origin or sandboxed context
  • Use safe content-serving defaults, such as restrictive browser policies and download-oriented handling where appropriate
  • Apply authorization checks and request-forgery protections to sensitive state-changing endpoints
  • Keep user-uploaded content and application sessions separated, and limit user and service privileges

How teams detect issues like this

  • Review upload and rendering code for SVG files served inline from the authenticated application origin
  • Use static analysis and code review to identify unsafe HTML/SVG handling, incomplete sanitization, and untrusted content rendered in active browser contexts
  • Test upload policies to confirm that disallowed SVG content is rejected, transformed, or isolated
  • Monitor administrative audit logs for unexpected state-changing requests following user-uploaded content being viewed
  • Enforce policies that restrict active content in user uploads and require security review of exceptions

Sources

SourceLink
github.comgithub.com/espocrm/espocrm/security/advisories/GHSA-4qv5-q4g7-hp5r
vulncheck.comvulncheck.com/advisories/espocrm-before-10.0.8-stored-xss-via-malicious-svg-attachment

Frequently asked

questions

A low-privileged user who can upload crafted SVG files may be able to set up the attack. The described scenario also requires an administrator to open the SVG in a separate tab and click it.

The described authenticated requests rely on an administrator's active session and permissions when interacting with the SVG.

Avoid serving untrusted SVG as active content in the application context. Reject or rasterize it where possible, or sanitize and isolate it with restrictive browser policies.

Treat uploads as untrusted, enforce strict file handling and content-serving policies, isolate user content from authenticated application origins, and protect sensitive endpoints with authorization and request-forgery defenses.

Find out what's already
exploitable in your codebase.