/

CVE-2026-126305

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in EspoCRM Knowledge Base Articles

CVE-2026-126305

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Session abuse and privilege escalation

Severity:

HIGH RISK

(7.3)

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 in Knowledge Base articles. A user with permission to create or edit articles can attach a JavaScript file and add a crafted link; if an administrator clicks it, the script can run in the administrator's session and create an administrator account with attacker-chosen credentials.

Affected context

The issue affects EspoCRM Knowledge Base articles in the affected release ranges. It becomes risky when a user with Knowledge Base create or edit access can add the attachment and crafted link, and an administrator later clicks that link.

Exploit preconditions

  • Attack surface: Knowledge Base article content and attachments
  • Required access: Permission to create or edit Knowledge Base articles
  • Trigger point: An administrator clicks the crafted link in an affected article
  • Why exploitation is possible: Untrusted article content can cause JavaScript to execute in the administrator's session

Why this happens

The application does not sufficiently prevent active script content or unsafe links from being used through Knowledge Base articles. Rendering attacker-controlled content in a trusted application context without effective sanitization or output encoding maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Potential impact

  • JavaScript may execute in an administrator's browser session
  • An attacker could perform actions with the administrator's authority
  • An attacker could create an administrator account with attacker-chosen credentials
  • The application's data or configuration could be altered by a compromised administrator session

General mitigation guidance

Common defensive patterns include:

  • Applying context-appropriate output encoding to user-controlled article content
  • Sanitizing rich text with a restrictive allowlist of permitted elements and attributes
  • Preventing uploads or links from serving executable content in trusted application contexts
  • Using browser security controls, such as a carefully configured Content Security Policy, as defense in depth
  • Limiting account-management capabilities and applying least privilege to user roles
  • Requiring appropriate protections for sensitive administrative actions

How teams detect issues like this

  • Review article rendering and attachment handling for missing sanitization or context-aware output encoding.
  • Use static analysis to identify unsafe rendering of user-controlled content and permissive HTML or URL handling.
  • Inspect code review changes involving Knowledge Base content, file uploads, and link rendering.
  • Apply security policies that restrict active content and validate allowed link schemes and attachment types.
  • Monitor for unexpected administrator-account creation and unusual administrative actions.

Sources

SourceLink
github.comgithub.com/espocrm/espocrm/security/advisories/GHSA-j6q5-9jwj-9p8q
vulncheck.comvulncheck.com/advisories/espocrm-before-10.0.9-stored-xss-via-knowledge-base-article-attachments

Frequently asked

questions

A user with permission to create or edit Knowledge Base articles can attach a JavaScript file and add the crafted link.

Yes. The described behavior requires an administrator to click the link for the script to run in their session.

Sanitize article content using a restrictive allowlist and apply context-appropriate output encoding when rendering it.

Treat user-authored content and attachments as untrusted, restrict active content, use browser security controls as defense in depth, and monitor sensitive administrative actions.

Find out what's already
exploitable in your codebase.