
Safe local proof of concept and technical analysis for CVE-2026-116004, an iframe sandbox bypass and stored XSS in Onyx preview, with source checks and browser reproduction.
English | Português do Brasil
Safe, local proof of concept for the unsafe iframe sandbox configuration in Onyx Craft's preview panel. The issue was researched and reported by Fernando Viana (capivara-research).
| Item | Detail |
|---|---|
| Component | Craft output preview |
| File | web/src/app/craft/components/output-panel/PreviewTab.tsx |
| Weaknesses | CWE-79, CWE-94 |
| Official affected range | Onyx through 5.0.0 |
| Official severity | CVSS 4.0 5.1 / CVSS 3.1 3.5 |
| Tested commit | 711a0479f1630dcce38f8f58212a63080702b753 |
| Interaction | A user views attacker-controlled preview content |
VulDB reserved the identifier on 2026-10-24 and published it on 2026-10-25.
The canonical record credits fernando viana (VulDB User) as reporter. Exact
record dates and vectors are preserved in
evidence/official-record-summary.md.
The CVE record names version 5.0 as affected. The repository separately pins the exact audited commit so the source evidence remains reproducible even if the product's release labels or default branch change.
An iframe sandbox starts as a locked room. Each sandbox token opens one capability. allow-scripts lets code run. allow-same-origin gives the document its real origin instead of an isolated opaque origin. When untrusted content shares the parent application's origin, these two permissions together can restore the exact capability the sandbox was expected to contain.
The relevant test is therefore behavioral: can script inside the framed preview read or modify the parent document?
The affected component renders the generated web application URL in this sandbox:
The dangerous condition is the combination of three facts:
attacker-controlled preview content
+ iframe can execute scripts
+ iframe keeps its real origin
+ preview and parent can share an origin
-> framed JavaScript can access the parent DOM
An iframe sandbox is a list of restored capabilities. allow-scripts restores JavaScript. allow-same-origin prevents the framed document from receiving an opaque origin. If untrusted content shares the application's origin, the browser's same-origin policy permits DOM access to the parent.
The harness serves two synthetic files from the same 127.0.0.1 origin. The parent uses the exact affected sandbox value. The child changes a harmless text marker in the parent DOM.
The validation has two independent layers:
source-check.py verifies the affected iframe, URL source, and sandbox tokens in the pinned Onyx source.reproduce.py launches Chromium and proves that framed JavaScript can modify the synthetic parent DOM.The local research checkout at commit 711a0479f1630dcce38f8f58212a63080702b753 was found and used for validation. No separate disclosure-time payload, screenshot, or report file was found outside that vendor checkout. This repository therefore includes only newly generated synthetic artifacts and does not claim nonexistent historical evidence.
The checkout provenance and affected source excerpt are recorded in
evidence/source-review.md.
python3 poc/source-check.py /path/to/onyx
python3 poc/reproduce.py
Dependencies on Debian/Ubuntu:
sudo apt install chromium chromium-driver python3-selenium
Expected vulnerable result:
"allow_scripts": true
"allow_same_origin": true
"parent_dom_accessed": true
[VULNERABLE] same-origin framed script modified the parent DOM
Exit codes:
| Code | Meaning |
|---|---|
1 | Vulnerable browser behavior reproduced |
0 | Parent DOM access was not reproduced |
| other | Browser or laboratory setup error |
docker build -t cve-2026-116004 .
docker run --rm cve-2026-116004
Serve the controlled pages:
python3 -m http.server 8000 --bind 127.0.0.1 --directory poc
Open http://127.0.0.1:8000/parent.html. A vulnerable browser condition changes PARENT_NOT_MODIFIED to PARENT_DOM_ACCESSED_CVE_2026_116004.
The demonstrated security-boundary failure is same-origin parent-DOM access from untrusted preview code. Depending on the parent application's exposed DOM and browser-held authority, this can permit actions in the viewing user's context. The safe PoC deliberately stops after changing a fixed text marker.
Defenders should inventory preview iframe policies and flag any untrusted
same-origin frame combining allow-scripts with allow-same-origin. Browser
regression tests should assert that preview content cannot read or modify a
sentinel in the parent document.
allow-scripts and allow-same-origin for untrusted same-origin content.allow-same-origin when application requirements permit it..
├── README.md
├── README.pt-BR.md
├── Dockerfile
├── poc/
│ ├── parent.html
│ ├── payload.html
│ ├── reproduce.py
│ └── source-check.py
├── evidence/
│ ├── validated-results.md
│ ├── official-record-summary.md
│ └── source-review.md
├── SECURITY.md
└── LICENSE
PreviewTab.tsx| Date | Event |
|---|---|
| 2026-09-21 | VulDB submission #992835 recorded |
| 2026-10-24 | CVE-2026-116004 reserved |
| 2026-10-25 | CVE record published |
| 2026-10-26 | Source and browser validation published in this repository |
Use this material only for authorized security testing, defensive validation, and education.