CVE-2026-7811

7.3

54yyyu · code-mcp

A path traversal vulnerability exists in the is_safe_path function of 54yyyu code-mcp due to improper handling of non-canonical paths. Unauthenticated attackers can leverage this flaw to read and write arbitrary files outside the intended workspace.

Executive summary

An unauthenticated path traversal vulnerability in 54yyyu code-mcp allows remote attackers to access and modify files outside the designated workspace.

Vulnerability

This is a path traversal flaw (CWE-22) residing in the is_safe_path function within src/code_mcp/server.py. The software relies on non-canonical path checks that permit traversal sequences, and unauthenticated attackers can exploit this remotely.

Business impact

A successful exploit permits unauthorized actors to read, write, or delete sensitive files across the underlying host filesystem. This leads to severe confidentiality and integrity compromises, potentially exposing proprietary data or disrupting essential system services. The CVSS score of 7.3 highlights the substantial operational and security risk posed by this flaw.

Remediation

Immediate Action: Restrict service access to trusted local users, and isolate filesystem permissions to the absolute minimum required scope until an official patch is released.

Proactive Monitoring: Monitor file access logs for anomalous traversal patterns, unexpected file modifications, and suspicious access requests directed at out-of-scope directories.

Compensating Controls: Deploy strict input validation rules at the network perimeter or application gateway to block requests containing directory traversal sequences.

Exploitation status

Public Exploit Available: Yes, a published PoC exists in the referenced GitHub issue.

Analyst recommendation

Given the severe potential for unauthorized file access and modification, administrators must treat this vulnerability with urgency. Apply defensive configuration controls immediately and monitor upstream repositories closely for the release of a canonical path validation patch.

Sources

Originally found and disclosed by CPT_Penner (VulDB User), with VulDB CNA Team (coordinator), per the CVE Program record.