Cybersecurity news

Jessica Doner

Back to the list

GitHub Copilot CLI Vulnerability Lets Attackers Steal Developer Secrets Using Encrypted Prompt Injection

Cyber Security News,

A hidden encrypted text technique can trick a coding agent into reading local files and sending them to a remote server.

AI and securityEncryption and certificatesVulnerabilities and patches

Overview

A security flaw in GitHub Copilot CLIA text-based terminal interface where users type commands instead of clicking buttons in a graphical window allows attackers to steal developer secretsPrivate credentials used by software, such as API keys, database passwords, and encryption keys by using a technique called Cryptographic Context InjectionA protocol flaw where an attacker swaps or mixes state values inside a cryptographic handshake or verification step. This method hides malicious instructions in encryptedTurn plaintext into ciphertext with a key text, which bypasses standard checks that only look at readable content. When a developer asks the agent to review an external URLThe full web address used to locate a specific page, file, or resource on the internet in autopilot mode, the agent decryptsTurn ciphertext back into plaintext with the key the hidden instructions and treats them as trusted commands. In a demonstration, the agent read a local .env.prod file and sent its contents to a remote serverA computer or program on a network that stores data and responds to requests from client devices within 28 seconds without warning the user. The technique works because static filters do not run cryptographic operations to reveal hidden text, so the agent executes the decrypted commands in its own shellThe command-line interpreter program that accepts text commands and runs them on an operating system environment. Any data accessible to the agent, including source codeThe human-readable programming instructions written by developers before they are compiled into a runnable program, configuration filesA text file that stores settings, network addresses, and options for how a program or server runs, credentialsThe login details, such as a username and password or key, that prove who an account belongs to, or tokensA short-lived digital pass that a server gives a logged-in user or app, is at risk if the agent has permission to read it.

Terms in this story

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.
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.
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.
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
URL
The full web address used to locate a specific page, file, or resource on the internet. Security filters inspect every URL in an incoming message to see whether the domain name is a newly registered lookalike or points to a known credential-harvesting server. Security+ objective 4.5 lists the term
decrypt
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)
server
A computer or program on a network that stores data and responds to requests from client devices. Online stores, email systems, and multiplayer games all run on servers in data centers or the cloud, making unpatched servers a primary target for intruders.
shell
The command-line interpreter program that accepts text commands and runs them on an operating system. When an attacker exploits a web server and pops a shell, they can type operating system commands directly as if they were sitting at the server's keyboard.
source code
The human-readable programming instructions written by developers before they are compiled into a runnable program. When attackers steal a company's private source code from a repository, they can study it to find hidden vulnerabilities or leaked API keys.
configuration files
A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
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
tokens
A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. 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 Cyber Security News website. Cite the article, not this page.

Read the full article on Cyber Security News (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