Directory TraversalAffected versions of this package are vulnerable to Directory Traversal via the getInputPath() function in the Docling component. An attacker can make Docling fetch attacker-selected URLs or read local files, exposing sensitive data accessible to the Camel process, by sending a String message body beginning with http:// or https://, or one that begins with / or contains a backslash, to a route that forwards it to a Docling endpoint. The DoclingProducer interprets these bodies as locations without an opt-in, and the URL-fetch or local-file-read behavior is available in both CLI and docling-serve modes.
Notes
- On the local-file read path,
maxFileSize defaults to 50 MiB, but its existence-guarded check skips paths that do not exist and pseudo-files reporting size zero; those sources are not bounded by that check.
Workarounds
- Do not route message bodies originating outside the deployment into Docling endpoints; this prevents attacker-controlled strings from being interpreted as remote URLs or local file paths.
- Supply documents as typed
File, byte[], or InputStream bodies instead of bare strings, or use CamelDoclingInputFilePath with a trusted path; this avoids prefix-based interpretation of the message body.
How to fix Directory Traversal? Upgrade org.apache.camel:camel-docling to version 4.18.5, 4.22.1 or higher.
| [4.15.0,4.18.5)[4.19.0,4.22.1) |