Sicherheitslücke: Claude Code Preview kann SSH-Schlüssel bei Dateien über 256KB lesen
Wer in Claude Codes Desktop-Vorschau HTML-Dateien über 256KB öffnet, riskiert, dass die KI auf lokale SSH-Schlüssel zugreifen kann. Der Vorfall zeigt, wie wichtig Grenzen für Dateizugriff in KI-Entwicklungstools sind.

Ein Coverage-Report ist die langweiligste Datei in einem Repository. Man klont ein Projekt, bittet Claude, sich die Test-Abdeckung anzusehen, und der HTML-Report öffnet sich im Vorschaubereich der App. Bis zu einem Fix, der am 17. August ausgeliefert wurde, reichte das laut Noma Labs aus, damit ein im Report verstecktes Skript Ihren privaten SSH-Schlüssel, Ihre AWS-Credentials und Ihren GitHub-Token auslesen und an den Server eines Dritten senden konnte.
Noma Security veröffentlichte die Forschung, die das Unternehmen SneakPeek nennt, am 14. Oktober 2026. Der Fehler steckte in der HTML-Vorschau der Claude Code Desktop App, nicht in einem Modell. Anthropic bewertete ihn mit CVSS v4.0 8.7 (High) und, so Noma, "behandelte die Auswirkung als gleichwertig mit Code-Ausführung auf dem Host." Der Fix erreichte die Nutzer über das Auto-Update in Claude Desktop 1.30096.1, so Nomas Zeitlinie.
Dieser Fehler ist bereits gepatcht. Es lohnt sich trotzdem, fünf Minuten zu investieren: Bestätigen Sie, dass Sie auf dem korrigierten Build sind, und lernen Sie die Form dieses Bugs kennen, denn Sie können denselben Fehler in Ihrem eigenen Code einbauen.
Claude Code Desktop verfügt über einen Browser-Bereich. Anthropics Dokumentation sagt, dass er "statische HTML-Dateien, PDFs, Bilder und Videos aus Ihrem Projekt öffnen kann", neben den Dev-Servern, die Claude startet, um seine eigenen Änderungen zu prüfen. Nomas Bericht beschreibt, wie dieser Bereich eine HTML-Datei lud und die Größe der Datei entschied, welchen Pfad sie nahm:
Die CSP, der opaque Origin und der Request-Filter existierten alle, und der Pfad für große Dateien bekam keines davon. Die Forscherin, die den Fall aufarbeitete, brachte es gegenüber CSO Online so auf den Punkt: "Die Schutzmechanismen waren real, sie deckten nur nicht jeden Pfad ab."
Kleine Dateien gingen durch die bewachte Tür. Dateien über 256 KB nahmen den Seiteneingang.
Nomas Proof of Concept benötigt kein Exploit-Kit, sondern nur ein Repository, das normal aussieht:
Nomas TL;DR ergänzt, dass der Payload auch Ihre echte IP-Adresse über WebRTC ermitteln konnte. Weder Nomas Beitrag noch die Pressemitteilung berichten von Ausnutzung in freier Wildbahn.
Die Zeitlinie ist der Teil, der Sie bei Ihrer eigenen Arbeit vorsichtig mit dem Satz "wir haben ihn gepatcht" machen sollte. Aus Nomas Beitrag und der Pressemitteilung:
Nomas eigene Worte zum Prozess sind freundlich gegenüber Anthropic: Das Unternehmen "nahm Nomas Disclosure von Anfang an ernst", so der Beitrag. Anthropic reagierte nicht sofort auf die Anfrage von CSO Online um Stellungnahme. CSO berichtet, dass Anthropic ein GitHub Security Advisory vorbereitet und ein CVE angefordert hat. Nomas Beitrag listet beides als ausstehend auf, während die Pressemitteilung sagt, sie seien im Oktober veröffentlicht worden. Stand 14. Oktober nennt keine dieser Quellen eine CVE-ID, prüfen Sie also vor der Suche die Advisory-Datenbank von GitHub.
Prüfen Sie die Version der Desktop App. Der Bug und der Fix liegen im Vorschau-Renderer der Desktop App, daher ist die relevante Version die von Claude Desktop. Anthropics Dokumentation empfiehlt, auf macOS Claude → Check for Updates zu öffnen, auf Windows Help → Check for Updates, und auf Linux über den Paketmanager zu aktualisieren. Sie wollen Version 1.30096.1 oder neuer. Wenn auf einem Rechner Ihres Teams das Auto-Update seit dem Sommer deaktiviert war, ist das der Kandidat, den Sie sich ansehen sollten.
Denken Sie daran, was auf dieser Maschine auf der Festplatte lag. Wenn jemand in Ihrem Team vor dem 17. August HTML aus nicht vertrauenswürdigen Repositories in der Desktop App in der Vorschau angesehen hat, ist das Rotieren der Credentials, die auf dieser Maschine lagen, eine billige Vorsichtsmaßnahme. Niemand hat einen Angriff gemeldet, also behandeln Sie es als Hygiene.
Verringern Sie den Wert einer gestohlenen Datei. CSOs Quellen empfehlen Scoped-Tokens mit kurzer Lebensdauer statt langlebiger Credentials auf Entwicklermaschinen sowie die Überwachung von Dateizugriffen und ausgehenden Verbindungen auf der Runtime-Ebene, denn Agent-Logs sehen diese Art von Aktivität möglicherweise nicht (CSO Online). Ein abgelaufener Token ist nutzlos, egal wo er austritt.
Sehen Sie sich ein fremdes Repository an, bevor Sie es einem Agenten übergeben. Dieser Befehl listet HTML-Dateien über 256 KiB in einem frischen Klon auf und überspringt node_modules:
find. -name '*.html' -size +256k \ -not -path '*/node_modules/*' Enter fullscreen mode Exit fullscreen mode Eine große HTML-Datei ist kein Beweis für irgendetwas. Coverage-Reports und gebündelte Dokumentationen werden von allein groß. Sie zeigt Ihnen nur, welche Dateien zuerst einen Blick in einem einfachen Texteditor verdienen.
Der Fix ist da. Die Gewohnheit zu prüfen, was ein nicht vertrauenswürdiges Repository enthält, bleibt bei Ihnen.
Nimmt man Electron aus der Gleichung, ist der Bug eine Verzweigung nach Größe, bei der nur ein Zweig die Sicherheitsprüfungen trägt. Hier ist eine vereinfachte Skizze des Musters, das Noma beschreibt:
// Skizze des Musters, nicht Anthropics Code const LIMIT = 256 * 1024; function previewUrl ( html: string, tmpPath: string ) { if ( Buffer. byteLength ( html ) < LIMIT ) { // CSP blockiert Skripte, Origin ist opaque const b64 = Buffer. from ( html ). toString ( " base64 " ); return `data:text/html;base64, ${ b64 } `; } // Große Datei: auf Festplatte geschrieben, geladen über file:// // Keine CSP hier, und der Origin kann lokale Pfade lesen return `file:// ${ tmpPath } `; } Enter fullscreen mode Exit fullscreen mode Größenverzweigungen existieren meist aus Performance-Gründen, und der Zweig für große Eingaben erbt tendenziell keine der Schutzmechanismen. Upload-Handler, die große Dateien an einem Validator vorbei streamen, haben dieselbe Form. Black Ducks Leiterin der Cybersecurity Governance sagte gegenüber CSO Online: "Sich bei Sicherheitsgrenzen auf größenbasierte Schwellenwerte oder clientseitige Filter zu verlassen, ist von Natur aus fragil."
Wenn Sie einen solchen Branch reviewen, stellen Sie eine Frage: Läuft jeder Pfad aus dieser Funktion durch dieselben Prüfungen? Wenn die Antwort von der Eingabegröße, vom Dateityp oder vom Modus der App abhängt, gehören die Prüfungen hinter die Verzweigung, nicht in einen ihrer Zweige.
SneakPeek begann als Designproblem: zwei Wege in denselben Bereich, und nur einer davon innerhalb der Vertrauensgrenze. Der System Design Pocket Guide: Interviews geht 15 reale Systeme Schritt für Schritt durch, und die Frage, wo Daten eine Grenze überschreiten und welche Schutzmechanismen diese Überschreitung absichern, taucht immer wieder auf. Er ist eines von 8 kurzen Büchern in Pocket Guides for Developers, die Agents, RAG, Prompts, Observability, Events, Datenbanken und Systemdesign behandeln.
Ich baue außerdem Hermes IDE, eine source-available Desktop-App für macOS, Windows und Linux, die Claude Code, Codex und andere Agents nebeneinander ausführt, wobei jede Aufgabe ihren eigenen Branch und Worktree bekommen kann. Wägen Sie das unter Berücksichtigung meiner Befangenheit ab. Sie ist auf GitHub.
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
A coverage report is the most boring file in a repo. You clone a project, ask Claude to look over the test coverage, and the HTML report opens in the app's preview pane. Until a fix shipped on August 17, that was enough, according to Noma Labs, for a script hidden in the report to read your SSH private key, your AWS credentials and your GitHub token, and send them to someone else's server.
Noma Security published the research, which it calls SneakPeek, on October 14, 2026. The bug was in the HTML preview of the Claude Code Desktop app, not in a model. Anthropic scored it CVSS v4.0 8.7 (High) and, per Noma, "treated the impact as equivalent to code execution on the host." The fix reached users through auto-update in Claude Desktop 1.30096.1, per Noma's timeline.
This one is already patched. It is still worth five minutes: confirm you're on the fixed build, and learn the shape of the bug, because you can ship the same one in your own code.
Claude Code Desktop has a Browser pane. Anthropic's docs say it can "open static HTML files, PDFs, images, and videos from your project", next to the dev servers Claude starts to check its own changes. Noma's write-up describes how that pane loaded an HTML file, and the size of the file decided which path it took:
The CSP, the opaque origin and the request filter all existed, and the big-file path got none of them. The researcher who wrote it up put it this way to CSO Online: "The protections were real, they just didn't cover every path."
Small files went through the guarded door. Files over 256KB took the side entrance.
Noma's proof of concept needs no exploit kit, only a repo that looks normal:
Noma's TL;DR adds that the payload could also get your real IP address through WebRTC. Neither Noma's post nor the press release reports exploitation in the wild.
The timeline is the part that should make you careful about "we patched it" in your own work. From Noma's post and the press release:
Noma's own words on the process are kind to Anthropic: the company "took Noma's disclosure seriously from the start," per the post. Anthropic did not immediately respond to CSO Online's request for comment. CSO reports that Anthropic is preparing a GitHub Security Advisory and has requested a CVE. Noma's post lists both as pending, though its press release says they were posted in October. As of October 14, none of these sources gives a CVE ID, so check GitHub's advisory database before you go looking for one.
Check the Desktop app version. The bug and the fix are in the Desktop app's preview renderer, so the version that matters is Claude Desktop's. Anthropic's docs say to open Claude → Check for Updates on macOS or Help → Check for Updates on Windows, and on Linux to update through your package manager. You want 1.30096.1 or later. If a machine on your team has had auto-update turned off since summer, that is the one to look at.
Think about what that machine had on disk. If someone on your team previewed HTML from repositories they didn't trust in the Desktop app before August 17, rotating the credentials that lived on that machine is a cheap precaution. Nobody has reported an attack, so treat it as hygiene.
Shrink what a stolen file is worth. CSO's sources recommend scoped, short-lived tokens instead of long-lived credentials on developer machines, and watching file reads and outbound connections at the runtime layer, because agent logs may not see this kind of activity ( CSO Online ). An expired token is useless wherever it leaks from.
Look before you hand a stranger's repo to any agent. This lists HTML files over 256 KiB in a fresh clone, skipping node_modules:
find. -name '*.html' -size +256k \ -not -path '*/node_modules/*' Enter fullscreen mode Exit fullscreen mode A big HTML file isn't proof of anything. Coverage reports and bundled docs get large on their own. It just tells you which files deserve a look in a plain text editor first.
The fix is in. The habit of checking what an untrusted repo carries is still yours.
Strip away Electron and the bug is a branch on size where only one side carries the security checks. Here is a simplified sketch of the pattern Noma describes:
// Sketch of the pattern, not Anthropic's code const LIMIT = 256 * 1024; function previewUrl ( html: string, tmpPath: string ) { if ( Buffer. byteLength ( html ) < LIMIT ) { // CSP blocks scripts, origin is opaque const b64 = Buffer. from ( html ). toString ( " base64 " ); return `data:text/html;base64, ${ b64 } `; } // Big file: written to disk, loaded from file:// // No CSP here, and the origin can read local paths return `file:// ${ tmpPath } `; } Enter fullscreen mode Exit fullscreen mode Size branches usually exist for performance, and the branch for big inputs tends to inherit none of the guards. Upload handlers that stream large files past a validator have the same shape. Black Duck's head of cybersecurity governance told CSO Online that "relying on size-based thresholds or client-side filters for security boundaries is inherently fragile."
When you review a branch like this, ask one question: does every path out of this function pass through the same checks? If the answer depends on input size, file type or which mode the app is in, the checks belong after the branch, not inside one arm of it.
SneakPeek started as a design problem: two paths into the same pane, and only one of them inside the trust boundary. The System Design Pocket Guide: Interviews walks through 15 real systems step by step, and deciding where data crosses a boundary, and what guards that crossing, comes up again and again. It's one of 8 short books in Pocket Guides for Developers, covering agents, RAG, prompts, observability, events, databases and system design.
I also build Hermes IDE, a source-available desktop app for macOS, Windows and Linux that runs Claude Code, Codex and other agents side by side, and each task can get its own branch and worktree. Weigh that with my bias in mind. It's on GitHub.