/

CVE-2026-34376

Severity:

HIGH RISK

(7.5)

Broken Access Control in PdfDing Shared PDF Endpoint

CVE-2026-34376

Analyzed

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-863

Impact:

Unauthorized Access to Sensitive Documents

Severity:

HIGH RISK

(7.5)

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

PdfDing versions prior to 1.7.0 contain an access-control flaw where the file-serving endpoint for shared PDFs does not properly enforce password checks.

An unauthenticated attacker who knows or can guess a shared file URL can bypass the password verification flow and directly download password-protected documents.

Affected context

The vulnerability affects PdfDing instances that expose shared PDFs via links intended to be protected by a password.

The issue occurs in the file-serving endpoint, which delivers the PDF content after a share link is created.

Instead of consistently verifying that the user has passed the password challenge, the endpoint can be invoked directly, allowing retrieval of files that users believed to be password-protected.

Exploit preconditions

  • Attack surface: Publicly reachable PdfDing file-serving endpoint for shared PDFs
  • Required access: No authentication or valid password is required; only network access to the instance
  • Trigger point: Direct HTTP request to the PDF-serving endpoint associated with a shared file
  • Why exploitation is possible: The business logic that protects shared links with a password is not consistently enforced at the final resource endpoint, resulting in missing authorization checks (CWE-863)

Why this happens

The root cause is a missing authorization decision on the resource-serving endpoint.

While the application implements a password-based verification flow for shared links, the final endpoint that delivers the PDF content does not re-check or enforce the user's authorization state.

This creates a broken access control condition described by CWE-863: Incorrect Authorization, where access control is applied to one part of the workflow (password form) but not to the actual protected resource.

As a result, any actor who can construct or reuse the direct file URL can obtain the document without satisfying the intended password gate.

Potential impact

  • Unauthorized viewing and downloading of confidential or private PDFs
  • Exposure of personal data, contracts, financial records, or other sensitive business documents
  • Violation of user expectations and potential non-compliance with privacy or data protection obligations
  • Facilitation of data exfiltration if links are guessed, leaked, or logged

General mitigation guidance

Effective mitigation generally relies on enforcing authorization at the resource level rather than only at the UI or workflow level.

Useful defensive patterns include:

  • Ensuring every file-serving endpoint performs a fresh authorization check based on the current user/session and the share's protection settings (e.g., password, expiration, ownership).
  • Centralizing access-control decisions in a reusable authorization layer rather than scattering checks across controllers and views.
  • Treating link passwords as true access-control tokens and verifying them at the point where the file bytes are served, not just when the link is first visited.
  • Using defense-in-depth measures such as short-lived signed URLs or tokens that encode authorization context and expire after use or time.
  • Applying the principle of least privilege so that unauthenticated or public contexts cannot access endpoints that serve user-owned, sensitive content by default.

How teams detect issues like this

Detection can focus on both design review and automated checks:

  • Code review signals: Resource-serving endpoints (e.g., download controllers, file handlers) that do not explicitly call centralized authorization routines or that rely only on prior UI checks.
  • Static analysis patterns: Rules that flag endpoints handling sensitive resources when they lack authentication/authorization middleware, guards, or decorators.
  • Policy enforcement: Application security policies requiring that all content-serving routes be wrapped with standard authentication and access-control mechanisms, as verified by automated tests.
  • Security testing: Targeted access-control tests where password-protected or restricted links are accessed directly, without completing the intended verification flow, including regression tests for all sharing features.
  • Runtime monitoring: Logging and alerting on download events from unauthenticated sessions or IPs that have not performed a successful password verification for the corresponding link.

Sources

SourceLink
github.comgithub.com/mrmn2/PdfDing/commit/ae579ea98c5603d1435e0d90e81d72151564088a
github.comgithub.com/mrmn2/PdfDing/pull/294
github.comgithub.com/mrmn2/PdfDing/releases/tag/v1.7.0
github.comgithub.com/mrmn2/PdfDing/security/advisories/GHSA-42x7-vvj4-4cj3

Frequently asked

questions

Yes. Any remote user with network access to the affected PdfDing instance and knowledge or discovery of a shared file URL can attempt to download the protected PDF without the password.

No. The vulnerability specifically allows unauthenticated access; the attacker does not need a user account, session, or valid password to retrieve the document once they have the direct endpoint URL.

Enforce authorization checks at the file-serving endpoint itself, ensuring that access is granted only after verifying the user/session has satisfied the share's protection requirements (e.g., password, link validity, ownership). This typically means routing all file delivery through a centralized authorization component.

Adopt a design where authorization is systematically applied at every resource boundary, use shared middleware or policy-based access control, and include automated tests that attempt to bypass workflows by directly calling resource endpoints. Regular security reviews of sharing and download features can further reduce the risk of similar flaws.

Find out what's already
exploitable in your codebase.