VulnerabilitiesHIGH

Protect VS Code from Dangerous Prompt Injections

GHGitHub Security BlogAug 25, 2025
VS Codeprompt injectionsGitHubsecurity
🎯

Basically, prompt injections can trick VS Code into revealing sensitive information or executing harmful code.

Quick Summary

A new risk has emerged for VS Code users: prompt injections. These can expose sensitive information like GitHub tokens and execute unwanted code. Stay safe by reviewing your extensions and limiting sensitive data in your code.

What Happened

Imagine chatting with a friend, but someone sneaks in a harmful message that changes the conversation entirely. This is similar to what happens with prompt injections in VS Code. When a chat is poisoned by indirect prompt injection, it can lead to serious consequences, such as exposing your GitHub tokens or confidential files. In some cases, it can even execute arbitrary code? without your consent.

The issue arises when VS Code features interact with chat-based tools or extensions?. If these tools are manipulated, they might inadvertently reveal sensitive information or perform actions you didn’t intend. Users need to be aware of these risks to safeguard their projects and personal data.

Why Should You Care

You might think, "This won’t happen to me," but the truth is, anyone using VS Code could be at risk. If you store sensitive information like GitHub tokens? in your code or use extensions? that interact with external services, you are vulnerable. It’s like leaving your front door unlocked — you might not think anything will happen, but it’s an open invitation for trouble.

By understanding how prompt injections? work, you can take steps to protect your code and your data. The key takeaway is that being informed is your first line of defense against these types of vulnerabilities.

What's Being Done

Developers and security experts are actively working on solutions to mitigate these risks. Here are some steps you can take right now:

  • Review your extensions: Ensure you’re only using trusted extensions? that have a good reputation.
  • Limit sensitive information: Avoid storing GitHub tokens? or confidential files directly in your code.
  • Stay updated: Keep your VS Code and its extensions? updated to the latest versions for the best security practices.

Experts are closely monitoring the situation, especially as more users adopt chat-based tools in their coding environments. They are looking for patterns in prompt injections? and developing better defenses to keep your coding experience safe.

💡 Tap dotted terms for explanations

🔒 Pro insight: Prompt injections exploit trust in chat-based tools; expect a rise in targeted attacks as these vulnerabilities become more widely known.

Original article from

GitHub Security Blog · Michael Stepankin

Read Full Article

Related Pings

HIGHVulnerabilities

HttpOnly Cookies at Risk from New 'Cookie Sandwich' Technique

A new technique called 'cookie sandwich' can steal secure cookies from websites. This affects users relying on HttpOnly flags for protection. Stay informed and ensure your online security measures are up to date.

PortSwigger Research·Jan 22, 2025
HIGHVulnerabilities

Exploitation Alert: Gladinet Vulnerability Targets Cryptography

A vulnerability in Gladinet's CentreStack and Triofox software is being actively exploited. Users are at risk of data breaches due to hardcoded cryptographic keys. Gladinet is working on a fix, but immediate action is needed to secure your systems.

Huntress Blog·Dec 18, 2025
HIGHVulnerabilities

XSS Vulnerability Found in RPi-Jukebox-RFID 2.8.0

A serious XSS vulnerability has been found in RPi-Jukebox-RFID 2.8.0. Users are at risk of attackers injecting harmful scripts. Update your software immediately to protect your device and data.

Exploit-DB·Feb 2, 2026
HIGHVulnerabilities

Hacked Construction Apps Threaten Jobsite Security

Hacked construction apps are exposing job sites to security risks. This affects contractors and workers alike, leading to potential project delays and safety issues. Stay updated on software patches and security measures to protect your projects.

Huntress Blog·Jan 21, 2026
HIGHVulnerabilities

URL Validation Bypass Cheat Sheet Gets Powerful New Payloads

A new update to the URL Validation Bypass Cheat Sheet introduces powerful payloads for web security experts. This matters because weak URL validations can lead to serious security breaches. Stay informed and protect your online activities!

PortSwigger Research·Oct 29, 2024
HIGHVulnerabilities

Windows 10 Faces Spoofing Vulnerability Risk

A spoofing vulnerability has been found in Windows 10 version 10.0.17763.7009. This flaw could allow attackers to impersonate legitimate users, risking your sensitive information. Microsoft is working on a patch, so stay alert and update your system when available.

Exploit-DB·Feb 11, 2026