Skip to content
GoogleGHSA-fhcg-rg39-8mv6

ChatGPT Agent - XSS on file://home/oai/redirect.html

MediumPublished Sep 8, 2025

### Summary ChatGPT's Agent mode can use a browser inside a remote VM (just like Operator). `file:///home/oai/redirect.html` is a file available in the remote VM by default, and it has an XSS through the target parameter. ```html <!-- Sample payload: file:///home/oai/redirect.html?target=javascript:alert(location.href) --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- This is a sentinel value detected in code, and should not be changed --> <title>file:///home/oai/redirect.html</title> <script> const t = new URLSearchParams(location.search).get("target"); if (t) setTimeout(() => location.replace(t), 0); </script> </head> <body> The page contents are still loading. Open the page again to see them. </body> </html> ``` Agent mode has an improved agency, and therefore it can be easily convinced to open a file:// URL by linking a file:// URL inside a webpage. There are 2 ways to exploit this vulnerability. 1. Find a sensitive local file whose content is also a valid JS. In which case, this might result in [XSSI](https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/11-Client_Side_Testing/13-Testing_for_Cross_Si...

GitHub advisory

Affected versions

PackageAffectedFixed in
ChatGPT Agent
Product
all versionsNo fix yet
Details and references

### Summary ChatGPT's Agent mode can use a browser inside a remote VM (just like Operator). `file:///home/oai/redirect.html` is a file available in the remote VM by default, and it has an XSS through the target parameter. ```html <!-- Sample payload: file:///home/oai/redirect.html?target=javascript:alert(location.href) --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- This is a sentinel value detected in code, and should not be changed --> <title>file:///home/oai/redirect.html</title> <script> const t = new URLSearchParams(location.search).get("target"); if (t) setTimeout(() => location.replace(t), 0); </script> </head> <body> The page contents are still loading. Open the page again to see them. </body> </html> ``` Agent mode has an improved agency, and therefore it can be easily convinced to open a file:// URL by linking a file:// URL inside a webpage. There are 2 ways to exploit this vulnerability. 1. Find a sensitive local file whose content is also a valid JS. In which case, this might result in [XSSI](https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/11-Client_Side_Testing/13-Testing_for_Cross_Site_Script_Inclusion). 2. Advanced attackers can use [SpectreJS](https://security.googleblog.com/2021/03/a-spectre-proof-of-concept-for-spectre.html), to read any local file by loading it as a subresource (image, script, etc). ### Severity Moderate - An attacker with a [SpectreJS](https://security.googleblog.com/2021/03/a-spectre-proof-of-concept-for-spectre.html) exploit can read arbitrary local files in the victim's remote VM for Agent mode. ### Proof of Concept ```html <a href="file:///home/oai/redirect.html?target=javascript:alert(location.href)">Click here</a> to see the page content. ``` [video](https://www.youtube.com/watch?v=q83By-ITspA) ### Timeline **Date reported**: 08/01/2025 **Date fixed**: 08/07/2025 **Date disclosed**: 09/08/2025

Severity from
GitHub (reviewed advisory)

More Google advisories

All Google
Advisory
Entrust nShield Connect XC - Multiple Vulnerabilities Leading to Insecure Boot Chain Protections
HighSep 22, 2025
FFmpeg - Heap-buffer-overflow write in jpeg2000dec
HighSep 8, 2025
SQLite: Integer truncation in findOrCreateAggInfoColumn
HighAug 25, 2025
OpenAI Operator - Click on arbitrary origin by TOCTOU attack
HighAug 18, 2025
SQLite - Integer Overflow in FTS5 Extension
MediumAug 15, 2025
tar-fs Link Directory Traversal Vulnerability
CriticalAug 14, 2025

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.