Miggo Logo

CVE-2025-30370: jupyterlab-git has a command injection vulnerability in "Open Git Repository in Terminal"

7.4

CVSS Score
3.1

Basic Information

EPSS Score
0.2339%
Published
4/4/2025
Updated
4/4/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
jupyterlab-gitpip< 0.51.10.51.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the 'Open Git Repository in Terminal' functionality in jupyterlab-git. Analyzing the patches shows the vulnerability was in the command execution handler within the addCommands function. Specifically, the execute handler for CommandIDs.gitTerminalCommand constructed a shell command ('cd <path>') using unsanitized repository path input. The patch removes this vulnerable code and replaces it with a safer approach using the 'cwd' parameter. The key vulnerable functions identified are the top-level addCommands function (which defines all commands) and the specific execute handler for the terminal command. These would appear in a runtime profiler when the vulnerability is triggered as they handle the user input and command execution chain.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## Ov*rvi*w On m*ny pl*t*orms, * t*ir* p*rty **n *r**t* * *it r*pository un**r * n*m* t**t in*lu**s * s**ll *omm*n* su*stitution [^*] strin* in t** synt*x `$(<*omm*n*>)`. T**s* *ir**tory n*m*s *r* *llow** in m**OS *n* * m*jority o* Linux *istri*utio

Reasoning

T** vuln*r**ility st*ms *rom t** 'Op*n *it R*pository in T*rmin*l' *un*tion*lity in jupyt*rl**-*it. *n*lyzin* t** p*t***s s*ows t** vuln*r**ility w*s in t** *omm*n* *x**ution **n*l*r wit*in t** `****omm*n*s` *un*tion. Sp**i*i**lly, t** `*x**ut*` **n*