Summary
CallBackery versions before 0.60.1 expose a path traversal issue in the unauthenticated /doc route, which passes a client-supplied name to a POD file lookup without validating it. A remote client may be able to read POD-rendered content from files the server process can access; files containing a POD directive without a closing =cut may expose content through the end of the file.
Affected context
The issue affects CallBackery applications using the documentation plugin at /doc. The route is mounted ahead of session checks and uses the requested name in Pod::Simple::Search->find without validating or restricting the resulting path. Because the lookup can resolve outside the intended documentation area, readable files may be exposed when their content is rendered as POD.
Exploit preconditions
- Attack surface: The application's
/docroute - Required access: No authentication is required according to the vulnerability description
- Trigger point: A request to the documentation route that causes the supplied name to be resolved as a file path
- Why exploitation is possible: The name is not validated or constrained to the documentation directory before path resolution, and the route runs before session checks
Why this happens
The route uses a user-controlled name in a file lookup without ensuring that the resolved path stays within an authorized documentation directory. Pod::Simple::Search->find converts name components into a path, but the application does not enforce a safe path boundary. This is CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The documentation renderer may also display content beyond a POD section when a file has a POD directive but no closing =cut.
Potential impact
- Unauthenticated clients may be able to read POD-rendered content from files accessible to the server process.
- Sensitive configuration, source, or operational information could be disclosed if it is readable and rendered by the route.
- Exposed information could support further attacks against the application or its environment.
General mitigation guidance
Mitigation generally focuses on constraining file access and reducing trust in route parameters. Common defensive patterns include:
- Resolving requested documentation paths and verifying they remain beneath a fixed documentation root.
- Allowlisting known documentation identifiers instead of accepting arbitrary path-like names.
- Applying authentication and authorization before serving documentation where public access is not required.
- Serving documentation from a dedicated, read-only location containing only intended files.
- Running the application with least-privilege filesystem access so that process-readable files are limited.
How teams detect issues like this
High-level review and monitoring approaches include:
- Searching for user-controlled route parameters passed to file lookup, path joining, or documentation-rendering APIs.
- Reviewing whether canonicalized paths are checked against an explicit allowed directory before files are opened.
- Checking route registration and middleware order to identify file-serving handlers that run before authentication.
- Applying static-analysis rules and code-review policies for path traversal risks and unrestricted file access.
- Monitoring documentation-route requests and access patterns for unusual path names or unexpected file resolution.

