Cybersecurity news

Jessica Doner

Back to the list

Encrypted instructions trick Copilot CLI into spilling developer secrets

CSO Online,

Researchers used encrypted instructions to trick a coding tool into reading sensitive files and sending them to an attacker.

Encryption and certificatesAI and security

Overview

Security researchers at Adversa AI demonstrated a technique called Cryptographic Context InjectionA protocol flaw where an attacker swaps or mixes state values inside a cryptographic handshake or verification step that allows GitHub Copilot CLIA text-based terminal interface where users type commands instead of clicking buttons in a graphical window to read sensitive local files and send their contents to an external endpointAny user device or server, such as a laptop, phone, or workstation, connected to a network. The attack hides malicious instructions inside encryptedTurn plaintext into ciphertext with a key content, which the tool treats as trusted context when it decryptsTurn ciphertext back into plaintext with the key the data using its own code-executionA flaw that lets an attacker run any commands or program they choose on the target machine environment. In a demonstration, the researchers got the tool to read a .env.prod file containing secretsPrivate credentials used by software, such as API keys, database passwords, and encryption keys and send its contents to an attacker-controlled endpoint in 28 seconds without any confirmation. GitHub validated the finding but declined to treat it as a vulnerabilityA flaw in software or hardware that lets an attacker do something the maker did not intend because the user had explicitly asked the tool to fetch attacker-controlled content while giving full permissionsThe specific rights granted to an account or app to read, write, or run files and services to act autonomously. The researchers disputed this assessment, arguing that the tool rejects the same instructions when presented in plaintextThe readable message before it is protected but accepts them after they have been encrypted and decrypted within its execution environment. A developer using the tool in autopilot mode with full permissions is affected by this risk of data theft.

Terms in this story

Cryptographic Context Injection
A protocol flaw where an attacker swaps or mixes state values inside a cryptographic handshake or verification step. Security advisories warn about cryptographic context injection when a library fails to bind a signature or session state to one specific connection, letting an attacker reuse or forge proof.
CLI
A text-based terminal interface where users type commands instead of clicking buttons in a graphical window. Software teams and administrators manage cloud servers and code repositories through a CLI because text commands are fast and easy to automate in scripts.
endpoint
Any user device or server, such as a laptop, phone, or workstation, connected to a network. Security teams install monitoring tools on every company endpoint because a single employee laptop infected at home can carry malware onto the corporate network.
Encrypted
Turn plaintext into ciphertext with a key. News stories use this verb when a defense scrambles sensitive records before storing them, or when ransomware locks a company's files so staff cannot open them without paying for the key. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 2); Security+ objective 1.4 lists the term
decrypts
Turn ciphertext back into plaintext with the key. Authorized users decrypt protected messages or drives with their secret key, while ransomware victims must either restore from backups or obtain the attacker's key to decrypt their files. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 2)
code-execution
A flaw that lets an attacker run any commands or program they choose on the target machine. When an advisory warns that a bug allows arbitrary code execution, an attacker who triggers the flaw can install malware, read files, or take over the program's account.
secrets
Private credentials used by software, such as API keys, database passwords, and encryption keys. Software teams use vault tools to keep secrets out of source code because anyone who finds a leaked secret in a public repository can log right in to the company's cloud services.
vulnerability
A flaw in software or hardware that lets an attacker do something the maker did not intend. Security advisories report a vulnerability when researchers or attackers find a coding mistake in an app or server that allows someone to break in or crash it. Security+ objective 2.3 lists the term
permissions
The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
plaintext
The readable message before it is protected. Breach reports note when a company stores passwords or customer records in plaintext, meaning anyone who breaks into the database can read them immediately without a key. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
bug bounty program
A reward program where a company pays independent researchers who responsibly report security flaws in its systems. Through a bug bounty program, ethical hackers can test a company's websites and apps under clear rules and earn cash rewards for finding bugs before criminals do. Security+ objective 4.3 lists the term
Encryption
Scrambling readable data with a mathematical key so only someone with the right key can read it. Online services use encryption to protect credit card numbers in transit, while ransomware gangs use the same math to lock a company's files until a ransom is paid. Security+ objective 1.4 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 CSO Online website. Cite the article, not this page.

Read the full article on CSO Online (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.

How a story is connected to the course, and every objective, week and job role

Same story at other outlets

Related