CVE-2025-62713: Kottster app reinitialization can be re-triggered allowing command injection in development mode
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @kottster/server | npm | >= 3.2.0, < 3.3.2 | 3.3.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability is a chain of two issues present only in the development mode of the Kottster application. The analysis of the provided patch commit 0a7d24922a23aac98372155348787670937eef89 confirms the description of the vulnerability.
First, the InitApp.execute function in packages/server/lib/actions/initApp.action.ts lacked a check to see if the application was already initialized. This allowed an attacker to call this action repeatedly, effectively creating a new administrative user and gaining an authentication token. The patch adds a check isSchemaEmpty(this.app.schema) to prevent this re-initialization.
Second, the InstallPackagesForDataSource.execute function in packages/server/lib/actions/installPackagesForDataSource.action.ts was vulnerable to command injection. It took a type parameter from user input and used it to construct a shell command for installing packages. There was no validation on the type parameter, allowing an attacker to inject arbitrary commands. The patch mitigates this by validating the type against an allowlist of DataSourceType values.
An attacker could chain these two vulnerabilities to first gain administrative access and then execute arbitrary code on the system, leading to a full remote code execution (RCE) on the development server.
Vulnerable functions
InitApp.executepackages/server/lib/actions/initApp.action.ts
InstallPackagesForDataSource.executepackages/server/lib/actions/installPackagesForDataSource.action.ts