Skip to main content
Vulnerability Database/CVE-2026-103412

CVE-2026-103412: Apache Camel Karavan Path Traversal Flaw

CVE-2026-103412 is a path traversal vulnerability in Apache Camel Karavan allowing authenticated users to write files outside project directories and execute arbitrary code. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-103412 Overview

CVE-2026-103412 is a path traversal vulnerability in Apache Camel Karavan affecting versions 3.18.0 through 4.22.0. The project file API uses supplied file names verbatim as path segments when writing files to the working copy for a Git commit. A file name containing ../ sequences causes content to be written outside the project directory to any location writable by the Karavan process. An authenticated user of any role can overwrite application configuration or files on the application classpath, leading to code execution inside the Karavan container. The flaw is tracked as CWE-22.

Critical Impact

Any authenticated Karavan user can write arbitrary files inside the container and achieve code execution by overwriting classpath resources or configuration.

Affected Products

  • Apache Camel Karavan 3.18.0 through 4.22.0
  • Deployments exposing the project file API to authenticated users
  • Containerized Karavan environments where the process user has write access to the application classpath

Discovery Timeline

  • 2026-10-09 - CVE CVE-2026-103412 published to NVD
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-103412

Vulnerability Analysis

Apache Camel Karavan is a visual development tool for building Apache Camel integrations. The project file API accepts a file name that is persisted into a per-project working directory before being committed to Git. The server concatenates the user-supplied name onto the project directory path without canonicalizing or validating the result against the intended base directory.

An authenticated attacker submits a file name such as ../../deployments/application.properties or a path that resolves inside the application classpath. The write proceeds using the attacker-controlled content, so configuration, templates, or JAR-adjacent resources can be replaced. Because Karavan loads code and configuration from the same container filesystem, overwriting a classpath resource yields code execution in the Karavan process context.

Root Cause

The root cause is missing path canonicalization in the project file resource handler. User input flows directly into filesystem write operations without resolving the final path and verifying it remains inside the project directory. The patch introduces a shared PathUtils helper that is used by both ProjectFileResource and CodeService to enforce the base-directory constraint.

Attack Vector

Exploitation requires network access to the Karavan API and valid credentials for any role. The attacker issues a project file create or update request containing a traversal sequence in the file name field, then supplies malicious content that will be executed when Karavan or the JVM next loads the overwritten resource.

java
// Security patch - import of new PathUtils helper
// File: karavan-app/src/main/java/org/apache/camel/karavan/api/ProjectFileResource.java
 import org.apache.camel.karavan.cache.KaravanCache;
 import org.apache.camel.karavan.cache.ProjectFile;
 import org.apache.camel.karavan.cache.ProjectFileCommited;
+import org.apache.camel.karavan.util.PathUtils;

 import java.net.URLDecoder;
 import java.nio.charset.StandardCharsets;

// File: karavan-app/src/main/java/org/apache/camel/karavan/service/CodeService.java
 import org.apache.camel.karavan.docker.DockerComposeConverter;
 import org.apache.camel.karavan.model.DockerComposeService;
 import org.apache.camel.karavan.model.PathCommitDetails;
+import org.apache.camel.karavan.util.PathUtils;
 import org.apache.commons.text.StringSubstitutor;

Source: GitHub commit 5e42524

Detection Methods for CVE-2026-103412

Indicators of Compromise

  • Project file API requests whose name or filename fields contain ../, ..\, URL-encoded variants (%2e%2e%2f), or absolute paths.
  • Unexpected modifications to files inside the Karavan container outside the project working directory, especially under /deployments, /app, or the JVM classpath.
  • New or altered .properties, .yaml, .jar, or .class files on the Karavan classpath without a corresponding deployment event.
  • Git working-copy commits containing files written to unusual relative paths.

Detection Strategies

  • Inspect HTTP request bodies to the project file endpoints for traversal patterns in file-name fields and alert on matches.
  • Compare the container filesystem against a known-good image baseline and flag deviations outside project working directories.
  • Correlate authenticated Karavan user activity with filesystem write events using host or container telemetry.

Monitoring Recommendations

  • Enable verbose request logging on the Karavan API and forward logs to a central SIEM for retention and query.
  • Monitor process execution and child-process spawns from the Karavan JVM for signs of post-exploit code execution.
  • Track audit events for configuration file changes on the application classpath between deployments.

How to Mitigate CVE-2026-103412

Immediate Actions Required

  • Upgrade Apache Camel Karavan to version 4.22.1, which introduces PathUtils validation for project file writes.
  • Rotate credentials and API tokens for all Karavan users following the upgrade, since any authenticated role could have exploited the flaw.
  • Review the Karavan container filesystem for unexpected files and redeploy from a trusted image if tampering is suspected.

Patch Information

The fix is published in Apache Camel Karavan 4.22.1. Details are available in the Apache Camel security advisory for CVE-2026-103412 and the upstream GitHub commit 5e42524. Additional discussion is available on the OpenWall oss-security list.

Workarounds

  • Restrict network access to the Karavan API to trusted operators using a reverse proxy or network policy until the upgrade is applied.
  • Run the Karavan container with a non-root user that lacks write access to the application classpath and configuration directories.
  • Mount the project working directory on a dedicated volume and make the classpath read-only where possible.
bash
# Example: enforce a read-only classpath and non-root user in Docker
docker run \
  --user 1001:1001 \
  --read-only \
  --tmpfs /tmp \
  -v karavan-projects:/karavan/projects \
  -p 8080:8080 \
  apache/camel-karavan:4.22.1

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.