HIGH 8.8

CVE-2026-12856: vscode-java JavaDoc Hover Command Injection Vulnerability

A security flaw in the vscode-java extension allows attackers to execute arbitrary commands through specially crafted JavaDoc popups. When a developer clicks a malicious link embedded in a JavaDoc hover tooltip, the extension runs whatever VS Code command the attacker specifies. In trusted workspaces, this can escalate to full system compromise. The attack requires user interaction—clicking the link—but no special credentials or complex setup.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.8 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses (CWE)
CWE-88
Affected products
1 configuration(s)
Published / Modified
2026-06-29 / 2026-07-15

NVD description (verbatim)

A flaw was found in the vscode-java extension, which provides Java language support for Visual Studio Code. The extension incorrectly trusts all Markdown content in JavaDoc hovers, allowing a malicious Java file to include hidden commands. If a user clicks a specially crafted link within a JavaDoc hover popup, an attacker can execute arbitrary VS Code commands, which can lead to full system compromise in trusted workspaces.

8 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vscode-java extension improperly sanitizes Markdown content displayed in JavaDoc hovers, failing to restrict command execution triggered by user clicks. An attacker can inject a malicious Java file into a project; when a developer hovers over a Java element with crafted JavaDoc, the hover popup renders untrusted Markdown that includes hidden command links. Clicking the link invokes VS Code's command API without validation, executing attacker-controlled commands at the privilege level of the active VS Code workspace. The root cause is CWE-88 (Argument Injection), where user-controlled input flows unsanitized into a command context.

Business impact

Development teams using vscode-java in trusted workspaces face risk of code injection, credential theft, and lateral movement. An attacker who tricks a developer into clicking a malicious JavaDoc link can plant backdoors, exfiltrate source code, or pivot to connected systems. Organizations with strict code review practices or air-gapped development environments see lower exposure, but the attack surface widens with open-source contributions and dependency updates, making it relevant to any shop relying on community Java packages.

Affected systems

The flaw affects vscode-java extension users, particularly those developing with Red Hat OpenShift Dev Spaces (which bundles the extension). Any developer using the extension in VS Code is potentially exposed if they work with untrusted or maliciously modified Java projects.

Exploitability

Exploitability is moderate to high. The attack requires user interaction (clicking a link in a JavaDoc popup), which is a realistic occurrence during normal development—developers routinely hover over methods to read documentation. No authentication is needed, and the attacker only needs to inject a malicious Java file into the target's project or a dependency. The CVSS score of 8.8 reflects the high impact (confidentiality, integrity, and availability are all compromised) despite the requirement for user interaction.

Remediation

Update the vscode-java extension to a patched version that properly sanitizes Markdown in JavaDoc hovers and restricts command execution. Verify against the vendor advisory for specific patched version numbers. As an interim control, disable or restrict the vscode-java extension in trusted workspaces until a patch is available, or operate VS Code in restricted-permission containers to limit command execution scope.

Patch guidance

Monitor Red Hat and the vscode-java project (typically hosted on GitHub) for security advisories and patched releases. Apply patches to all developer workstations and CI/CD systems using the extension as soon as they are published. If you use OpenShift Dev Spaces, coordinate updates through your platform's release cycle. Test patches in a staging environment before rolling out to reduce disruption.

Detection guidance

Monitor VS Code command execution logs for suspicious patterns, especially commands executed from hover interactions. Look for Java projects with unusual JavaDoc markup (encoded or obfuscated command syntax). Review git history for unexpected additions of malicious Java files to dependencies. In a corporate environment, consider blocking execution of certain high-risk VS Code commands (e.g., terminal spawning, file operations outside the workspace) via extension policy or workspace settings.

Why prioritize this

Despite the lack of public exploitation (KEV status is false), the CVSS score of 8.8 and the realistic user-interaction vector warrant high priority. Development environments are high-value targets for initial access and code tampering. The flaw affects a widely used extension in a trusted context (the IDE), amplifying the blast radius if exploited. Prioritize patching in organizations with open-source consumption, collaborative development, or frequent vendor integrations.

Risk score, explained

The score of 8.8 (HIGH severity) reflects full impact across confidentiality, integrity, and availability. While user interaction is required (reducing attack complexity), the network-accessible nature of the vector, the prevalence of VS Code in development workflows, and the trusted execution context of IDE commands all contribute to the elevated score. The flaw is not yet weaponized in the wild, but the low barrier to crafting a malicious Java file and distributing it via compromised packages makes exploitation probable if the vulnerability remains unpatched.

Frequently asked questions

Do I need to be connected to the internet for this to happen?

No. The attack occurs entirely within your local VS Code environment. An attacker needs to introduce a malicious Java file into your project or a dependency you use. Once the file is present, hovering over it triggers the flaw without any network call required to execute the command.

What if I only use trusted, internal Java libraries?

Risk is significantly lower, but not zero. Ensure your supply chain is truly isolated—patch management, code review, and dependency scanning are critical. If an internal developer's account is compromised or a build server is breached, malicious Java files can still be introduced.

Does this affect me if I use the extension but never click JavaDoc hovers?

This particular flaw requires a click on a malicious link within a JavaDoc hover popup. If you never interact with hovers, your exposure is minimal. However, best practice is to patch anyway, as behavioral changes and new workflows could inadvertently trigger the vulnerability.

Is there a temporary workaround while waiting for a patch?

The safest interim control is to uninstall or disable the vscode-java extension until a patched version is available. Alternatively, run VS Code in a sandboxed or container environment with restricted permissions, so any arbitrary command execution is confined. Always apply the official patch as soon as it is released.

This analysis is provided for informational purposes and reflects the state of publicly available information as of the publication date. Severity scores and vulnerability details are based on vendor advisories and CVE documentation. Organizations should verify all technical details and patch availability through official vendor channels before implementing remediation. This is not legal or compliance advice. Security decisions should incorporate your organization's risk tolerance, threat modeling, and regulatory requirements. Source: NVD (public-domain), retrieved 2026-08-08. Analysis generated by SEC.co (claude-haiku-4-5).