OpenCode hack exposes API keys amid AI distillation attacks
A security breach in the open-source AI coding project OpenCode exposed stored API keys, causing unauthorized charges and suspended projects for some users.
Overview
OpenCode, an open-sourceSoftware whose source code is publicly available for anyone to inspect, use, modify, and share AI coding project, notified users that a security breachAn incident where an intruder gets into a system and views or copies private records exposed the API keysA secret string a program sends with an API request to identify itself and get access they used with external providers. The incident resulted from a large-scale distillation attack that targeted the company's systems for at least 48 hours. Distillation is a technique that trains smaller AI models using responses generated by larger ones, but it becomes an attack when it involves unauthorized queries. The breach affected 1.4% of OpenCode Console users who had linked external providers, including Anthropic, OpenAI, and Google. Some of these users reported unauthorized charges exceeding $1,700 on their Google Cloud accounts. The earliest possible exposure of the keysThe secret value that locks or opens a message occurred on October 17, 2026, at 00:30 UTC.
Terms in this story
- open-source
- Software whose source code is publicly available for anyone to inspect, use, modify, and share. Most websites and apps rely on hundreds of open-source code libraries, so a single security flaw or malicious update in a popular library can affect thousands of companies at once.
- security breach
- An incident where an intruder gets into a system and views or copies private records. When a retailer, clinic, or school suffers a data breach, customer names, email addresses, or financial records are exposed to criminals who may sell them online. Security+ objective 3.3 lists the term
- API keys
- A secret string a program sends with an API request to identify itself and get access. Software teams sometimes accidentally upload an API key to a public code repository, allowing attackers who scan for leaked keys to rack up cloud bills or read private databases. Security+ objective 4.6 lists the term
- API
- A structured interface that lets one software program request data or actions from another program. Mobile apps, websites, and cloud services talk to backend servers through an API, and a poorly protected API can let attackers pull customer records in bulk. Security+ objective 4.7 lists the term
- keys
- The secret value that locks or opens a message. Many breach and ransomware stories come down to who holds the cryptographic key, since strong encryption protects data only as long as the key stays secret. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
- distillation attacks
- Systematically querying a large AI model to train a smaller copycat model on its outputs. AI labs monitor their APIs for a distillation attack where a competitor uses automated accounts to harvest millions of reasoning traces instead of training a model from scratch.
- maintainer
- The developer or small team responsible for reviewing changes and publishing releases for an open-source project. Supply chain attackers often target a volunteer maintainer with phishing emails or offers to help, hoping to gain publishing rights over a popular code library.
- machine-learning
- Building software models that learn patterns from example data instead of following only hand-written rules. Many spam filters and endpoint security tools use machine learning to spot unfamiliar malware, while attackers probe those models to find inputs that slip past detection.
- AI agents
- Artificial intelligence software that can plan steps, call tools, and take actions on its own. Many stories cover agentic AI when companies connect language models to email, browsers, and databases, creating new risks if a hidden prompt tricks the agent into leaking data.
- private key
- The key only its owner holds. When attackers steal a company's private key in a breach, they can sign malware so computers trust it or impersonate the company's website to intercept customer traffic. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 2); Security+ objective 1.4 lists the term
- credentials
- The login details, such as a username and password or key, that prove who an account belongs to. Many breaches begin when attackers steal an employee's login credentials through a fake website and sign in to the company network as if they belonged there. Security+ objective 4.6 lists the term
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the BleepingComputer website. Cite the article, not this page.
Read the full article on BleepingComputer (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Breach or attack
"...security breach last night related to a large-scale distillation attack..." Found by reading the article; these exact words are in it - Who is affected: "1.4% of OpenCode Console users..."
Copied word for word from the article - Security+ 3.3 Compare and contrast concepts and strategies to protect data.
"......external providers were exposed in a security breach." Found in the opening sentences - Security+ 4.6 Given a scenario, implement and maintain identity and access management.
"OpenCode hack exposes API keys amid AI distillation attacks..." Found in the headline - CYBR 101 week 1: the course, logins and two-factor sign in, cyber roles and jobs
"The open-source AI coding project OpenCode has notified a..." Found in the opening sentences - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"OpenCode hack exposes API keys amid AI distillation attacks..." Found in the headline - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of open source tactics that enable initial access (e.g. social engineering, phishing)
"Users can connect AI models from multiple AI providers..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of AI security risks, threats, and vulnerabilities and potential risk mitigation solutions.
"Distillation is a legitimate machine-learning technique..." Found by reading the article; these exact words are in it
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- OpenCode Data Breach Exposes API Keys Linked to Third-Party Services
- OpenCode Breach Could Affect OpenAI, Anthropic and Google
- OpenCode Console Breach May Have Exposed OpenAI, Anthropic, and Google API Keys
- OpenCode Security Breach Exposes Third-Party API Keys of its Console Users
- OpenCode API Key Breach: Third-Party AI Credentials May Have Been Exposed