Skip to main content

scaffold-mcp CVE-2026-7237

| EUVDEUVD-2026-26008 MEDIUM
Path Traversal (CWE-22)
2026-04-28 VulDB
5.5
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

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

  1. Access
    Identify accessible scaffold-mcp endpoint
  2. Delivery
    Craft traversal payload in file_path
  3. Exploit
    Send request to write-to-file tool
  4. Execution
    Bypass directory restrictions
  5. Persist
    Write malicious file to sensitive path
  6. Impact
    Achieve code execution or data exfiltration

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Remote exploitation requires the scaffold-mcp server to be network-accessible with the write-to-file tool enabled and exposed via API endpoints. No authentication is required (PR:N in CVSS vector), making any internet-facing or internal network deployment vulnerable. The write-to-file tool must be included in the active MCP configuration - organizations that have disabled or removed this tool are not affected. Attack complexity is low (AC:L) because standard HTTP clients can send crafted requests without specialized tooling. No user interaction is needed (UI:N), enabling automated attacks. Exploitation is limited to environments running scaffold-mcp versions ≤1.0.27 - version 1.1.0+ include path validation that blocks traversal attempts. Typical deployment scenarios at risk include development servers exposed to corporate networks, cloud-hosted code generation services, and containerized CI/CD runners with network ingress. Local-only deployments (localhost-bound services) remain vulnerable to attackers with network access to the host machine.

Impact

Real-world risk is HIGH despite moderate CVSS 7.3 score. The CVSS vector AV:N/AC:L/PR:N/UI:N confirms remote unauthenticated exploitation with low complexity - no credentials, user interaction, or special conditions required. The CVSS temporal score includes E:P (Proof-of-concept exploit exists) and RL:O (Official fix available), both confirmed by GitHub references. Public exploit availability (issue #88) significantly lowers the barrier for opportunistic attacks. Impact is Confidentiality:Low, Integrity:Low, Availability:Low (C:L/I:L/A:L), indicating partial compromise across all CIA triad elements - attackers can read sensitive configuration files, modify source code or build artifacts, or delete critical project files. No EPSS or KEV data provided, suggesting this is not yet widely exploited in the wild, likely due to the niche nature of MCP scaffolding tools. However, development tools are high-value targets in supply chain attacks. Organizations using scaffold-mcp in automated workflows (CI/CD pipelines, code generation services) face elevated risk. The S:U (Scope Unchanged) means exploitation is contained to the vulnerable component's privileges, but in typical development environments, this often means full access to project repositories and secrets. Patch availability in version 1.1.0 makes this immediately remediable - risk persists only for unpatched instances.

Exploit ScenarioDerived

An attacker identifies a publicly accessible scaffold-mcp server endpoint (common in development environments or CI/CD systems). Using the publicly available proof-of-concept from GitHub issue #88, they craft a malicious API request to the write-to-file tool with file_path set to '../../../etc/cron.d/backdoor' (Linux) or '..\..\..\Windows\System32\drivers\etc\hosts' (Windows). The vulnerable server fails to validate the path, allowing the attacker to write arbitrary content outside the intended project directory. The attacker plants a cron job for persistence, exfiltrates SSH keys or cloud credentials from typical filesystem locations (/root/.ssh/id_rsa, /home/*/.aws/credentials), or modifies build scripts to inject malicious code into software artifacts. In CI/CD contexts, this enables supply chain compromise by poisoning build outputs.

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 – Apr 28, 2026

Path traversal in AgiFlow scaffold-mcp's write-to-file tool allows remote unauthenticated attackers to read, write, or delete arbitrary files on the server by manipulating the file_path parameter. Versions up to 1.0.27 are affected. Public exploit code exists (GitHub issue #88), enabling attackers to bypass directory restrictions and access sensitive files or overwrite critical system files. CVSS 7.3 (High) with network attack vector and no authentication required. Vendor-released patch available in version 1.1.0 (commit c4d23592).

RemediationAI

Immediately upgrade AgiFlow scaffold-mcp to version 1.1.0 or later via package manager (npm update @agiflowai/aicode-toolkit@1.1.0 or equivalent). The patched version implements input validation for file_path parameters in the write-to-file tool, as detailed in pull request #89 (https://github.com/AgiFlow/aicode-toolkit/pull/89) and commit c4d23592ae5fb59cfeefc4641e6826f8ac89b9c6. If immediate upgrade is not feasible, implement these compensating controls: (1) Disable or remove the write-to-file tool from scaffold-mcp configurations if not essential for operations - this eliminates the attack surface but breaks file generation workflows; (2) Run scaffold-mcp processes in sandboxed containers or chroot jails with minimal file system access, limiting traversal impact to isolated directories - adds operational complexity and may break legitimate path references; (3) Deploy application firewall or proxy to inspect and reject requests containing path traversal patterns (../, absolute paths) in file_path parameters - may produce false positives for legitimate nested directory operations. Note these workarounds provide defense-in-depth only; patching is the definitive solution. Verify patch application by checking package version (npm list @agiflowai/aicode-toolkit) and testing file_path validation behavior.

Affected VersionsENISA

scaffold-mcp 1.0.7
scaffold-mcp 1.0.21
scaffold-mcp 1.0.15
scaffold-mcp 1.0.27
scaffold-mcp 1.0.19
scaffold-mcp 1.0.18
scaffold-mcp 1.0.6
scaffold-mcp 1.0.13
scaffold-mcp 1.0.1
scaffold-mcp 1.0.9
scaffold-mcp 1.0.2
scaffold-mcp 1.0.12
scaffold-mcp 1.0.11
scaffold-mcp 1.0.17
scaffold-mcp 1.0.16
scaffold-mcp 1.0.26
scaffold-mcp 1.0.8
scaffold-mcp 1.0.23
scaffold-mcp 1.0.0
scaffold-mcp 1.0.25
scaffold-mcp 1.0.5
scaffold-mcp 1.0.14
scaffold-mcp 1.0.20
scaffold-mcp 1.0.3
scaffold-mcp 1.0.24
scaffold-mcp 1.0.10
scaffold-mcp 1.0.22
scaffold-mcp 1.0.4

Affected Packages

euvd scaffold_mcp no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

This vulnerability affects AgiFlow scaffold-mcp, a Model Context Protocol (MCP) scaffolding tool for AI code generation workflows. The flaw resides in packages/scaffold-mcp/src/server/index.ts within the write-to-file tool implementation. CWE-22 (Path Traversal) occurs when user-supplied file_path input is not properly validated or sanitized before file system operations. Attackers can inject directory traversal sequences (e.g., '../../../etc/passwd' or absolute paths) to escape intended working directories. The CPE identifier cpe:2.3:a:agiflow:scaffold-mcp indicates this is an application-level vulnerability in the AgiFlow vendor's scaffold-mcp component. MCP tools typically run with the privileges of the host process, making unrestricted file access particularly dangerous in development or CI/CD environments where these scaffolding tools operate.

Know when Scaffold Mcp gets its next vulnerability

  • 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 (VulDB) PRIMARY 5.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P

Primary rating from Vendor (VulDB) · only source for this CVE.

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

6
CVSS changed
Apr 29, 2026 - 01:12 NVD
6.9 (MEDIUM) 5.5 (MEDIUM)
PoC Detected
Apr 29, 2026 - 01:00 vuln.today
Public exploit code
Severity Changed
Apr 28, 2026 - 08:22 NVD
HIGH MEDIUM
CVSS changed
Apr 28, 2026 - 08:22 NVD
7.3 (HIGH) 6.9 (MEDIUM)
Patch released
Apr 28, 2026 - 07:30 nvd
Patch available
CVE Published
Apr 28, 2026 - 06:45 nvd
MEDIUM 5.5

DescriptionCVE.org

A vulnerability was detected in AgiFlow scaffold-mcp up to 1.0.27. Affected by this issue is some unknown functionality of the file packages/scaffold-mcp/src/server/index.ts of the component write-to-file Tool. The manipulation of the argument file_path results in path traversal. The attack may be launched remotely. The exploit is now public and may be used. Upgrading to version 1.1.0 can resolve this issue. The patch is identified as c4d23592ae5fb59cfeefc4641e6826f8ac89b9c6. You should upgrade the affected component.

Executive ViewAI

Why It Matters

AgiFlow scaffold-mcp versions up to 1.0.27 contain a path traversal vulnerability in the write-to-file tool that allows unauthenticated attackers to read, write, or delete arbitrary files on affected servers. This exposes organizations to data theft, system compromise, and service disruption without requiring authentication or user interaction. Immediate patching is critical for any deployment of this component.

Business Impact: High
Compensating Controls

Apply vendor patch to version 1.1.0 or later. If immediate patching is not feasible, implement network-level access controls to restrict connectivity to the scaffold-mcp service and monitor file system access logs for suspicious write/delete operations targeting sensitive directories.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL 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 Yes
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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