/

CVE-2026-41679

Severity:

CRITICAL RISK

(10.0)

Authentication Bypass Leading to Remote Code Execution

CVE-2026-41679

Analyzed

Vulnerability type

Category:

Authentication Bypass Leading to Remote Code Execution

CWE:

CWE-287, CWE-862, CWE-1188

Impact:

Full Remote Code Execution on the Application Host

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Paperclip, a Node.js and React-based AI orchestration platform, contains a critical flaw that allows an unauthenticated attacker to reach remote code execution via exposed APIs when the application is running in authenticated mode with default settings.

Any network-accessible instance can be compromised without user interaction or credentials by chaining several API calls that incorrectly assume proper authorization.

Affected context

This vulnerability affects deployments of the Paperclip server that:

  • Are reachable over a network (e.g., public internet, corporate LAN, or VPN)
  • Run in authenticated mode with default configuration
  • Expose backend APIs that orchestrate AI agents and can trigger host-level actions

In such environments, backend routes expected to be protected by authentication and authorization inadvertently allow unauthenticated sequences of calls, enabling an attacker to drive workflows up to arbitrary code execution.

Exploit preconditions

  • Attack surface: Network-accessible Paperclip server (HTTP/HTTPS API).
  • Required access: None; the attacker does not need credentials or an existing account.
  • User interaction: Not required; exploitation is fully automated and does not rely on social engineering or UI clicks.
  • Trigger point: A sequence of API calls into endpoints that:
  • Are intended for authenticated users or internal orchestration
  • Can ultimately cause the system to execute arbitrary commands or code
  • Why exploitation is possible:
  • Authentication checks (CWE-287) on critical endpoints are missing, incomplete, or inconsistently enforced.
  • Authorization controls (CWE-862) are not reliably verifying that the caller has the right to invoke high-privilege actions.
  • The system exposes orchestration or execution primitives (CWE-1188) that are accessible through a predictable API chain, allowing attackers to compose them into a code execution workflow.

Why this happens

The core issue is a combination of broken authentication, missing authorization, and unsafe exposure of powerful orchestration primitives.

At a design level, Paperclip exposes backend APIs that can:

  • Create or control AI-driven "agents"
  • Trigger actions that likely touch the file system, shell, or external services

These APIs are intended for authenticated, authorized users, but the protection model is flawed:

  • CWE-287 (Improper Authentication): The system either misclassifies the deployment mode, trusts certain headers or states without verification, or fails to enforce login checks consistently on sensitive endpoints.
  • CWE-862 (Missing Authorization): Once an endpoint is reachable, it assumes that any caller is permitted to perform high-impact operations, such as configuring agents, injecting tasks, or executing commands.
  • CWE-1188 (Insecure Default Initialization of Resource): Defaults in the authenticated mode create resources (e.g., system agents, admin-like workflows, or execution contexts) in a way that is overly permissive, exposing them through publicly accessible routes without additional hardening.

Conceptually, this maps to a pattern where an application exposes "admin-level" or "orchestrator" APIs under the assumption that authentication and role checks occur elsewhere, but in practice those checks are absent or bypassable on a critical path.

Potential impact

  • Full remote code execution on the host running the Paperclip server
  • Complete compromise of the Paperclip application, including:
  • AI agent configurations
  • Business logic workflows
  • Stored prompts, tasks, and possibly secrets passed to agents
  • Lateral movement within the hosting environment, depending on the server's privileges and network access
  • Data exfiltration or manipulation within connected systems (e.g., databases, third-party APIs the agents can touch)
  • Use of the compromised instance as a pivot point for further attacks within the organization
  • Service disruption, denial-of-service, or sabotage of automated business operations orchestrated by Paperclip

General mitigation guidance

Effective mitigation focuses on strengthening authentication, enforcing authorization, and constraining high-privilege capabilities by default.

1. Harden Authentication Boundaries

  • Ensure that every entry point capable of creating, modifying, or executing workflows and agents enforces robust authentication.
  • Centralize authentication checks in middleware rather than duplicating them inside handlers, to reduce the chance of missed routes.
  • Treat "mode" flags (like authenticated) as hints, not as full access controls; verify authentication per request.

2. Enforce Principle-of-Least-Privilege Authorization

  • Introduce explicit authorization checks (e.g., role- or permission-based) for all operations that can:
  • Trigger external commands
  • Modify system configuration
  • Access sensitive data or secrets
  • Separate "user-level" actions from "admin-orchestration" or "execution" actions, with different permissions and distinct API namespaces.
  • Avoid default "admin-equivalent" permissions for any newly created users, tokens, or agents.

3. Restrict Powerful Orchestration Primitives

  • Treat features that can run shell commands, execute code, or invoke arbitrary tools as high-risk resources.
  • Gate such operations behind:
  • Strong authentication and authorization
  • Explicit opt-in configuration
  • Clear, minimal, and auditable APIs instead of broad "execute anything" endpoints
  • Consider sandboxing or isolating execution (containers, restricted runtimes, non-root users) to limit blast radius.

4. Secure-by-Default Configuration

  • Make the default deployment configuration restrictive:
  • Disable remote execution capabilities unless explicitly enabled.
  • Require initial admin setup steps that include strong credentials and potentially second factors.
  • Avoid relying solely on obscurity (e.g., random URLs) for protection; rely on proper security controls.

5. Reduce Exposure

  • Place the Paperclip server behind a trusted reverse proxy or API gateway that:
  • Terminates TLS
  • Enforces access policies (e.g., IP allowlists, OAuth/OpenID Connect)
  • Where feasible, limit network exposure so the server is not directly reachable from the public internet.

How teams detect issues like this

Organizations can pursue multiple approaches to identify and monitor for this class of issue:

1. Static Analysis & Code Scanning

  • Use static analysis tools or linters to detect:
  • HTTP route handlers that lack authentication/authorization middleware
  • Direct access to orchestration or execution modules (e.g., process spawning, task runners) from public routes
  • Define custom rules that flag:
  • Endpoints that call OS-level APIs, shell commands, or code evaluation functions
  • Endpoints under an /api/admin, /internal, or similar namespace that are missing guards.

2. Code Review Practices

  • During review, require a checklist that includes:
  • "Is this endpoint authenticated?"
  • "What authorization is required and where is it enforced?"
  • "Can this operation lead to code execution or access to sensitive systems?"
  • Look for patterns where:
  • Authentication assumptions are documented but not technically enforced
  • Mode flags (authenticated, demo, etc.) replace concrete access control checks.

3. Security Testing & Fuzzing

  • Perform API-focused penetration tests:
  • Enumerate all routes from the API documentation or from traffic capture.
  • Test unauthenticated access to endpoints expected to be protected, including complex multi-step workflows.
  • Use fuzzers or automated tools to chain API calls and detect unauthorized privilege escalation paths.

4. Runtime Monitoring and Logging

  • Log all access to high-privilege endpoints and execution features, including:
  • Caller identity (or lack thereof)
  • Source IP, user agent, and correlation IDs
  • Configure alerting for:
  • Requests to critical orchestration or execution APIs without associated authenticated users
  • Abnormal patterns such as rapid multi-step API sequences from the same unauthenticated source.

Sources

SourceLink
github.comgithub.com/paperclipai/paperclip/security/advisories/GHSA-68qg-g8mg-6pr7

Frequently asked

questions

The vulnerability is broadly exploitable against any network-accessible Paperclip instance running in authenticated mode with default configuration. An attacker only needs the target's address; no credentials, accounts, or prior foothold are required, and the exploit can be fully automated.

The attacker needs only network access to the Paperclip server over HTTP/HTTPS. There is no requirement for local access, valid credentials, or user interaction, which is why the risk is rated as critical.

The safest pattern is to enforce strict authentication and explicit authorization on every endpoint that can influence agent behavior, modify configuration, or execute code. This typically means centralizing access control in middleware, treating orchestration APIs as admin-only, and verifying both identity and permissions unconditionally for each sensitive request.

Prevention starts with security-by-design principles: identify all capabilities that can lead to code execution or high-impact state changes, design them as privileged operations behind clearly defined access control boundaries, and ensure defaults are locked down rather than permissive. Combine architectural reviews, secure coding guidelines, automated scans for unprotected routes, and regular security testing of API workflows to catch regressions early.

Find out what's already
exploitable in your codebase.