Summary
Vendure's RichTextDescriptionCell can execute administrator-controlled markup while attempting to convert a description into plain text. A lower-privilege administrator who stores malicious content may cause script execution when another administrator views an affected list row, potentially compromising the viewer's session and administrative privileges.
Affected context
The issue can occur in Vendure deployments that use affected dashboard list views and render administrator-controlled descriptions through RichTextDescriptionCell. Relevant views may include Products, Collections, Promotions, Payment Methods, and Shipping Methods. Risk depends on whether a user can submit description content and whether another administrator later views the stored value.
Exploit preconditions
- Attack surface: Vendure administrative dashboard list views
- Required access: Permission to create or modify content displayed in affected description fields
- Trigger point: Rendering a stored description when an administrator views an affected table row
- Why exploitation is possible: The dashboard assigns untrusted markup to a live element's
innerHTML; active resource markup may execute during assignment before the resultingtextContentis read
Why this happens
The vulnerability results from treating DOM insertion as a safe text-extraction mechanism. Assigning untrusted content to innerHTML causes the browser to parse and potentially activate markup before the application reads textContent, so later text extraction does not prevent script execution. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.
Potential impact
- A viewing administrator's session may be compromised
- Unauthorized administrative actions could be performed in the viewer's context
- Cross-privilege actions may be possible where authorization boundaries are insufficient
- Cross-channel administrative data or configuration could be accessed or modified
- Malicious content may persist and affect multiple administrators
General mitigation guidance
Mitigation generally focuses on ensuring that untrusted descriptions are handled as data rather than executable markup.
Common defensive patterns include:
- Avoiding
innerHTMLfor untrusted content, including temporary DOM elements used for text extraction - Using text-only DOM APIs or trusted, context-aware sanitization when formatting is required
- Applying allowlists for permitted markup and attributes
- Treating administrator-entered content as untrusted regardless of the administrator's role
- Enforcing least privilege for dashboard users, channels, and administrative operations
- Applying appropriate browser-side protections such as a restrictive Content Security Policy
- Preserving output encoding at the final rendering context
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules for assignments to
innerHTML,outerHTML, and related DOM sinks - Code review checks for DOM parsing performed on user-controlled or administrator-controlled values
- Tests that submit markup containing active elements and verify that rendered views remain inert
- Review of rich-text sanitization policies, including allowed tags, attributes, and URL schemes
- Runtime monitoring for unexpected administrative actions following dashboard content views
- CI policy enforcement requiring approved sanitization utilities or safe text APIs
Automated security review tools may help flag dangerous DOM sinks, but findings should be assessed against the actual data flow and rendering context.

