Skip to content

Security: Dangerous unauthenticated global package installation endpoint#520

Open
tuanaiseo wants to merge 1 commit intodecolua:masterfrom
tuanaiseo:contribai/fix/security/dangerous-unauthenticated-global-package
Open

Security: Dangerous unauthenticated global package installation endpoint#520
tuanaiseo wants to merge 1 commit intodecolua:masterfrom
tuanaiseo:contribai/fix/security/dangerous-unauthenticated-global-package

Conversation

@tuanaiseo
Copy link
Copy Markdown
Contributor

Problem

The install route executes npm install -g 9remote via child_process.exec on POST with no visible auth checks. This allows remote triggering of privileged package installation, creating severe supply-chain and host-compromise risk.

Severity: critical
File: src/app/api/9remote/install/route.js

Solution

Remove this endpoint from production. If absolutely required, enforce admin authentication, CSRF protection, strict allowlisting, rate limiting, audit logging, and run in a sandboxed non-privileged worker instead of the web process.

Changes

  • src/app/api/9remote/install/route.js (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

The install route executes `npm install -g 9remote` via `child_process.exec` on POST with no visible auth checks. This allows remote triggering of privileged package installation, creating severe supply-chain and host-compromise risk.

Affected files: route.js

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant