Skip to content

Hardcoded relative path traversal (../..pdf) in print module URL triggers WAF block #9488

Description

@iampzhao

The print module's frontend code builds its info.json request using a hardcoded relative path containing directory traversal sequences (../../), rather than deriving the path from window.location or an existing config value. This causes the exact same literal query string to be sent on every GeoNetwork version which triggers my WAF rules, since the payload is indistinguishable at the request-string level from a real traversal attempt

Located at:
web-ui/src/main/resources/catalog/components/common/map/print/PrintDirective.js
web-ui/src/main/resources/catalog/components/common/map/print/PrintMapDirective.js

Both define

var options = {
  printConfigUrl: "../../pdf/info.json?url=..%2F..%2Fpdf",
  ...
};

My installation is not sitting behind a reverse proxy.

Can we derive the base path from window.location.pathname instead of a hardcoded relative traversal string?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions