[Security Enhancement] Prevent enumeration of pangolin resources #1127

Closed
opened 2026-04-05 18:19:28 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @TheConen on 8/2/2025

Given

A Pangolin resource is configured to always allow access from a specific IP range and disallow access from all other IP ranges.

Image

When

A user from outside of the allowed IP range accesses that resource

Then

Current behavior

Pangolin returns a 401 Unauthorized

Image

This allows to enumerate all resource that are present on a Pangolin instance that the user does not have access to and potentially target specific services. E.g. if a user knows that vaultwarden.mydomain.com exists, than he also knows that there are probably rules that always allow access to specific paths like /api/* that he could try to exploit.

Proposed behavior

Pangolin should return the same response as if the resource was not found, so a non-existing resource is not differentiable from a resource that access was denied to.

Added after some Discord discussion: This only applies to the response presented to the user. Internal backend tools like CrowdSec might rely on the 401 (or 403) code.

Image

References

OWASP: Enumerate Applications on Webserver

*Originally created by @TheConen on 8/2/2025* ## Given A Pangolin resource is configured to always allow access from a specific IP range and disallow access from all other IP ranges. <img width="1591" height="413" alt="Image" src="https://github.com/user-attachments/assets/272e61dc-d396-41aa-b00d-a2ffa7dc44d7" /> ## When A user from outside of the allowed IP range accesses that resource ## Then ### Current behavior Pangolin returns a 401 Unauthorized <img width="1297" height="451" alt="Image" src="https://github.com/user-attachments/assets/54a250ac-4db9-4b60-8520-15c72f525874" /> This allows to enumerate all resource that are present on a Pangolin instance that the user does not have access to and potentially target specific services. E.g. if a user knows that vaultwarden.mydomain.com exists, than he also knows that there are probably rules that always allow access to specific paths like `/api/*` that he could try to exploit. ### Proposed behavior Pangolin should return the same response as if the resource was not found, so a non-existing resource is not differentiable from a resource that access was denied to. Added after some Discord discussion: This only applies to the response presented to the user. Internal backend tools like CrowdSec might rely on the 401 (or 403) code. <img width="1060" height="274" alt="Image" src="https://github.com/user-attachments/assets/bcfe2519-d55a-415a-b138-f6ad6f52a6ab" /> ## References [OWASP: Enumerate Applications on Webserver](https://owasp.org/www-project-web-security-testing-guide/stable/4-Web_Application_Security_Testing/01-Information_Gathering/04-Enumerate_Applications_on_Webserver)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1127