Miggo Logo

CVE-2025-53967: figma-developer-mcp vulnerable to command injection in get_figma_data tool

7.5

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
9/30/2025
Updated
9/30/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
figma-developer-mcpnpm<= 0.6.20.6.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a command injection in the figma-developer-mcp server. The root cause is the use of child_process.exec in the fetchWithRetry function in src/utils/fetch-with-retry.ts. This function constructs a curl command using a URL that can be controlled by user input. An attacker can inject shell commands into the URL, which will then be executed by the server.

The primary vulnerable function is fetchWithRetry. The patch replaces the vulnerable exec with execFile, which prevents command injection by separating the command from its arguments.

The get_figma_data tool is explicitly mentioned as a vector for this vulnerability. The handler for this tool is the getFigmaData function in src/mcp/tools/get-figma-data-tool.ts. This function takes user input and passes it to the vulnerable fetchWithRetry function. The patch adds input validation to the fileKey parameter in this function.

Similarly, the download-figma-images tool, handled by the downloadFigmaImages function, also takes user input that is used to construct a URL. The patch adds validation to the nodeId parameter in this function, suggesting it was also a potential vector for the command injection vulnerability.

Therefore, a runtime profile during exploitation would likely show getFigmaData or downloadFigmaImages calling fetchWithRetry.

Vulnerable functions

fetchWithRetry
src/utils/fetch-with-retry.ts
The function `fetchWithRetry` is vulnerable to command injection because it uses `child_process.exec` to execute a `curl` command where the URL is constructed from user-provided input. An attacker can inject shell metacharacters into the URL, leading to arbitrary command execution. The patch replaces the unsafe `exec` with `execFile`, which is not vulnerable to this type of injection.
getFigmaData
src/mcp/tools/get-figma-data-tool.ts
The `getFigmaData` function is the handler for the `get_figma_data` tool. It takes a `fileKey` from the user and uses it to construct a URL that is then passed to the vulnerable `fetchWithRetry` function. The patch adds input validation for the `fileKey` to mitigate the vulnerability.
downloadFigmaImages
src/mcp/tools/download-figma-images-tool.ts
The `downloadFigmaImages` function is the handler for the `download-figma-images` tool. It takes a `fileKey` and `nodeId` from the user, which are used to construct a URL that is then passed to the vulnerable `fetchWithRetry` function. The patch adds input validation for the `nodeId` to mitigate the vulnerability.

WAF Protection Rules

WAF Rule

### Summ*ry * *omm*n* inj**tion vuln*r**ility *xists in t** `*i*m*-**v*lop*r-m*p` M*P S*rv*r. T** vuln*r**ility is **us** *y t** uns*nitiz** us* o* input p*r*m*t*rs wit*in * **ll to `**il*_pro**ss.*x**`, *n**lin* *n *tt**k*r to inj**t *r*itr*ry syst

Reasoning

T** vuln*r**ility is * *omm*n* inj**tion in t** `*i*m*-**v*lop*r-m*p` s*rv*r. T** root **us* is t** us* o* `**il*_pro**ss.*x**` in t** `**t**Wit*R*try` *un*tion in `sr*/utils/**t**-wit*-r*try.ts`. T*is *un*tion *onstru*ts * `*url` *omm*n* usin* * URL