Visual Studio 2022Application · Microsoft

CVE-2026-21257

HIGH · 8.0 CVSS v3.1 Published 2026-02-10
Fix available
A fix is available. Upgrade to 17.14.26 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Improper neutralization of special elements used in a command ('command injection') in GitHub Copilot and Visual Studio allows an authorized attacker to elevate privileges over a network.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

A command injection vulnerability in GitHub Copilot and Visual Studio allows an authorized attacker to inject malicious commands through improper neutralization of special elements, potentially enabling privilege escalation over a network. The vulnerability stems from insufficient input validation when constructing system commands within the affected IDE components.

MitigationImplement strict input validation and proper escaping of special characters for all command construction in Visual Studio and GitHub Copilot; prioritize fixing the code paths that handle external command execution and user-supplied input.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Visual Studio 2022Application
Affected:>= 17.14.0, < 17.14.26

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Visual Studio 2022 version
    Open Visual Studio, go to Help > About Microsoft Visual Studio, or check Programs and Features for the version number
    Affected if The version displayed is 17.14.0 through 17.14.25 (any version >= 17.14.0 but < 17.14.26)
  2. Confirm the exact build number
    In Visual Studio About window, note the build number listed next to the version (for example, 17.14.0 to 17.14.25 falls within the affected range)
    Affected if The build number is between 17.14.0 and 17.14.25 inclusive
  3. Determine if GitHub Copilot is configured
    Check Visual Studio extensions or settings for GitHub Copilot presence: go to Extensions > Manage Extensions, or look for Copilot in the IDE toolbar/status bar
    Affected if GitHub Copilot extension is installed and enabled in Visual Studio
  4. Identify any external command execution features in use
    Review installed extensions, custom tools, or external tool configurations in Visual Studio that execute system commands (check Tools > External Tools or any custom build task configurations)
    Affected if Extensions or tools that execute external system commands are present and active
  5. Check for user-supplied input handling in custom extensions
    If custom extensions are installed, review their configuration for any settings that pass user input to system command execution paths
    Affected if Extensions that handle external command execution with user-supplied input are present

You are affected if Visual Studio 2022 version is 17.14.0 through 17.14.25 AND GitHub Copilot or external command execution features are enabled in the IDE.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 17.14.26 or later
Fixed in 17.14.26
Interim mitigation

Implement strict input validation and proper escaping of special characters for all command construction in Visual Studio and GitHub Copilot; prioritize fixing the code paths that handle external command execution and user-supplied input.

Recommended fix High confidence

Visual Studio 2022 version 17.14.26

  1. Open Visual Studio Installer on your machine
  2. Locate the Visual Studio 2022 installation entry
  3. Click the 'Update' button to check for and install available updates
  4. Ensure the update installs version 17.14.26 or later
  5. After the update completes, restart Visual Studio 2022
  6. Verify the installed version by going to Help > About Microsoft Visual Studio and confirm the version is 17.14.26 or higher
Caveat Standard Visual Studio update considerations apply - review extension compatibility and workspace settings after upgrading

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Visual Studio 2022 Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA3.0 h
19.0 hours of engineering $3,380
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,408.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-21257 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-21257 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data