retool-postmessage-xss: Retool Self-Hosted - postMessage XSS via Custom Component Collections
- Template: retool-postmessage-xss
- Name: Retool Self-Hosted - postMessage XSS via Custom Component Collections
- Description: Retool Self-Hosted versions 3.284.0 through 3.284.11 contain a cross-site scripting (XSS) vulnerability in the custom component collections iframe handler. The postMessage event listener in custom-component-collections.html accepts messages from any origin without validation and dynamically imports the received code via data:text/javascript URLs, allowing arbitrary JavaScript execution in the Retool instance origin context.
- Severity: high
- Authors: DhiyaneshDk
- Tags: retool, xss, postmessage, vuln
- References: https://docs.retool.com/releases, https://docs.retool.com/changelog/disclosures/custom-component-xss
- Max requests: 2
- Directory: http/vulnerabilities
- Path: http/vulnerabilities/retool/retool-postmessage-xss.yaml
- Digest: 4a0a004730450220229db5e3c267581dc3fa00456d7b49def7b8f882a4bed0fb625ec4cbf77bb4d4022100e764b2c995b5008a97503eea80aae799a5a3ee2efbd2bb8ec68993c143aa1b01
- Created at: 2026-04-17T08:30:01Z
- Updated at: 2026-04-17T17:06:39Z
- Age in days: 221
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/retool/retool-postmessage-xss.yaml
- Checked, none or zero: cves, verified
- Not known: impact, remediation
Classification
- Checked, none or zero: cwe
- Not known: cvss score, cvss vector, epss score, epss percentile, cpe
Metadata
- Fofa-query: title="Retool"
- Max-request: 2
- Product: retool
- Shodan-query: title:"Retool"
- Vendor: retool
Products
| Product | Indexed | Url |
|---|---|---|
| retool:retool | yes | /v1/products/retool/retool |
Labels
- Name: Retool Self-Hosted - Cross-Site Scripting
- Impact: Attackers can execute arbitrary JavaScript in the Retool instance origin, potentially stealing session tokens or performing actions as the victim.
- Remediation: Update to the latest version of Retool Self-Hosted.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: user_interaction
- Requirements: Attacker needs to send a crafted postMessage to the iframe
- Labels source: securitycontext
- Not known: from cve
```yaml
id: retool-postmessage-xss
info:
name: Retool Self-Hosted - postMessage XSS via Custom Component Collections
author: DhiyaneshDk
severity: high
description: |
Retool Self-Hosted versions 3.284.0 through 3.284.11 contain a cross-site scripting (XSS) vulnerability in the custom component collections iframe handler. The postMessage event listener in custom-component-collections.html accepts messages from any origin without validation and dynamically imports the received code via data:text/javascript URLs, allowing arbitrary JavaScript execution in the Retool instance origin context.
reference:
- https://docs.retool.com/releases
- https://docs.retool.com/changelog/disclosures/custom-component-xss
metadata:
max-request: 2
vendor: retool
product: retool
shodan-query: title:"Retool"
fofa-query: title="Retool"
tags: retool,xss,postmessage,vuln
http:
- method: GET
path:
- "{{BaseURL}}/custom-component-collections.html"
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_all(body, "Custom Component", "custom-component-collections")'
condition: and
internal: true
extractors:
- type: regex
name: js-bundle
part: body
group: 1
regex:
- '["'']/?(libs/custom-component-collections[^"'']+\.js)["'']'
internal: true
- method: GET
path:
- "{{BaseURL}}/{{js-bundle}}"
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_all(body, "customComponentCode", "data:text/javascript", "addEventListener(\"message\"")'
condition: and
digest: 4a0a004730450220229db5e3c267581dc3fa00456d7b49def7b8f882a4bed0fb625ec4cbf77bb4d4022100e764b2c995b5008a97503eea80aae799a5a3ee2efbd2bb8ec68993c143aa1b01:922c64590222798bb761d5b6d8e72950
```