← Security advisories
Apache Camel security advisory

CVE-2026-103412

Karavan project file names escape the project directory when a project is committed to Git

Description

Improper limitation of a pathname to a restricted directory ('path traversal') vulnerability in Apache Camel Karavan. A project file name supplied through the project file API was used verbatim as a path segment when the project was written to the working copy for a Git commit, so a name containing `../` sequences caused the file content to be written outside the project directory, to any location writable by the Karavan process. An authenticated user of any role could use this to overwrite application configuration or files on the application classpath and so execute code in the Karavan container. This issue affects Apache Camel Karavan: from 3.18.0 before 4.22.1. Users are recommended to upgrade to version 4.22.1, which fixes the issue.

Mitigation

Users are recommended to upgrade to version 4.22.1, which fixes the issue. Apache Camel Karavan has no maintenance branches, so 4.22.1 is the only release containing the fix.

Credit

This issue was discovered and reported by CyberLeo

Notes

Project file names and project ids received through the project file API are now validated before they are used as path segments: names that are empty, contain .., a path separator or a NUL byte, or that fall outside ^[a-zA-Z0-9_\-.]+$ are rejected on create, update, rename and copy. The path built for each file is additionally resolved against the project directory and refused if the result escapes it, so the write itself is guarded independently of the entry point.

The commit https://github.com/apache/camel-karavan/commit/5e4252494817af0cd2697216bd02f361037fedcf resolved the issue and has more details.

References