CVE-2026-40022: Verified Reproduction
CVE-2026-40022: Apache Camel embedded HTTP/management servers can bypass authentication on subpaths when a non-root context path is configured, allowing unauthenticated access to protected routes and management endpoints.
CVE-2026-40022 is verified against org.apache.camel:camel-platform-http-main · maven. Affected versions: 4.14.1 before 4.14.6, 4.18.0 before 4.18.2. Fixed in 4.14.6 / 4.18.2 / 4.20.0. This high reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00267.
What Is CVE-2026-40022?
CVE-2026-40022 is a medium-severity authentication bypass (CWE-288) in Apache Camel's embedded HTTP and management servers (camel-platform-http-main), where requests to subpaths of a configured non-root context path can reach protected routes without being challenged for credentials. Pruva reproduced it (reproduction REPRO-2026-00267).
CVE-2026-40022 Severity & CVSS Score
CVE-2026-40022 is rated high severity, with a CVSS base score of 8.2 out of 10.
High — serious impact or readily exploitable. Prioritize remediation.
Affected org.apache.camel:camel-platform-http-main Versions
org.apache.camel:camel-platform-http-main · maven versions 4.14.1 before 4.14.6, 4.18.0 before 4.18.2 are affected.
How to Reproduce CVE-2026-40022
pruva-verify REPRO-2026-00267 curl -O https://www.pruva.dev/api/v1/reproductions/REPRO-2026-00267/artifacts/bundle/repro/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2026-40022
- reached the target end-to-end
- on the real production code path
- high confidence
- the upstream fix blocks the same trigger
unauthenticated HTTP GET to /api/hello (subpath under the non-root context path /api)
- Camel Main embedded HTTP server (camel-platform-http-main) with camel.server.path=/api, camel.server.authenticationEnabled=true, camel.server.basicPropertiesFile set, and camel.server.authenticationPath NOT set; platform-http route /hello served at /api/hello
reproduction_steps.sh How the agent worked
Root Cause and Exploit Chain for CVE-2026-40022
Apache Camel's embedded HTTP server (camel-platform-http-main) enables an
authentication bypass on subpaths whenever a non-root context path (e.g.
/api or /admin) is configured via camel.server.path /
camel.management.path and the operator does not explicitly set
camel.server.authenticationPath / camel.management.authenticationPath.
The BasicAuthenticationConfigurer and JWTAuthenticationConfigurer derive
the authentication-protected path from properties.getPath() (the context path)
and only special-case the exact root /. Because the Vert.x sub-router that
hosts the platform-http routes is mounted with router.route(path + "*").subRouter(subRouter),
sub-router route matching is performed relative to the consumed context prefix,
so an auth handler registered at the literal context path (e.g. /api) never
matches the relative subpaths that the business routes are served on. The net
effect is that unauthenticated requests to any subpath (e.g. /api/hello or
/admin/observe/info) reach protected routes and management endpoints without
being challenged for credentials.
- Package / component affected:
org.apache.camel:camel-platform-http-main(and the Vert.x enginecamel-platform-http-vertxit drives). The same*AuthenticationConfigurerclasses protect both the embedded HTTP server (HttpServerConfigurationProperties) and the embedded management server (HttpManagementServerConfigurationProperties). - Affected versions:
camel-platform-http-main4.14.1 before 4.14.6, and 4.18.0 before 4.18.2 (fixed in 4.14.6, 4.18.2, and 4.20.0). - Risk level: High (advisory severity moderate). Unauthenticated remote
access to protected business routes and management endpoints. The management
/observe/infoendpoint can disclose runtime metadata (user, working/home directory, process id, JVM and OS info).
Impact Parity
- Disclosed / claimed maximum impact: Authentication bypass
(
authz_bypass) — unauthenticated HTTP access to protected routes and management endpoints on the embedded server. - Reproduced impact from this run:
authz_bypasson theapi_remotesurface — an unauthenticatedGET /api/helloto a real running Camel Main embedded HTTP server returns200 OK(bodyok) on the vulnerable build, while the identical configuration on the fixed build returns401 Unauthorized. Authentication is demonstrably enabled (credentials succeed, and the fixed build rejects without them). - Parity:
fullfor the claimed authentication-bypass surface. The management-server variant (/admin/observe/info) shares the identical*AuthenticationConfigurercode path and root cause; this run focuses on the server-route surface, which is the primary claimed remote vector. - Not demonstrated: No code execution, memory corruption, or crash is claimed or produced — the issue is purely an authorization bypass, which is what was reproduced.
Root Cause
In the vulnerable releases the authentication path is resolved inline inside
each configurer, e.g. in BasicAuthenticationConfigurer.configureAuthentication(...):
String path = isNotEmpty(properties.getAuthenticationPath())
? properties.getAuthenticationPath()
: properties.getPath(); // <-- falls back to the CONTEXT path
// root means to authenticate everything
if ("/".equals(path)) {
path = "/*";
}
When camel.server.authenticationPath is unset, path becomes the configured
context path (e.g. /api). Only the exact root "/" is widened to "/*";
any other context path is left as an exact path. That path is then stored
on the AuthenticationConfigEntry and registered on the Vert.x sub-router in
VertxPlatformHttpServer:
// auth handler registered on the sub-router at the (exact) context path
authenticationConfig.getEntries()
.forEach(entry -> subRouter.route(entry.getPath()).handler(entry.createAuthenticationHandler(vertx)));
...
// sub-router mounted for the context prefix
router.route(configuration.getPath() + "*").subRouter(subRouter); // e.g. router.route("/api*").subRouter(subRouter)
The platform-http consumer route (platform-http:/hello) is registered on the
same sub-router as subRouter.route("/hello"). Because Route.subRouter()
delegates routing to the sub-router relative to the consumed /api prefix,
a request to /api/hello is matched inside the sub-router against the relative
path /hello. The auth handler registered at the literal /api therefore
never matches a relative subpath, so the /hello route is reached without the
authentication handler ever executing. A request without credentials returns
200 OK (the route body) instead of 401 Unauthorized.
Fix
The fix (tags camel-4.14.6, camel-4.18.2, camel-4.20.0) centralizes path
resolution in a new default method on MainAuthenticationConfigurer and makes
both configurers call it:
/**
* Resolves the effective authentication path. When no explicit authentication
* path is configured, defaults to {@code /*} so that all subpaths under the
* context path are protected.
*/
default String resolveAuthenticationPath(String authenticationPath, String contextPath) {
if (ObjectHelper.isNotEmpty(authenticationPath)) {
return authenticationPath;
}
return "/*";
}
With the default now "/*", the auth handler is registered at
subRouter.route("/*"), which matches the relative subpath /hello (and every
other subpath) → an unauthenticated request is challenged with 401.
- Advisory: https://camel.apache.org/security/CVE-2026-40022.html
- Fix location:
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/authentication/(MainAuthenticationConfigurer,BasicAuthenticationConfigurer,JWTAuthenticationConfigurer) in tagscamel-4.14.6/camel-4.18.2/camel-4.20.0.
Reproduction Steps
- The self-contained script is
bundle/repro/reproduction_steps.sh. - It materializes a minimal Camel
Mainapplication that:- registers a route
from("platform-http:/hello").setBody(constant("ok")), - enables the embedded HTTP server with
camel.server.enabled=true,camel.server.path=/api,camel.server.port=8080, - enables basic authentication with
camel.server.authenticationEnabled=trueandcamel.server.basicPropertiesFile=auth.properties(user.admin=secret), without settingcamel.server.authenticationPath(the vulnerable precondition). It builds and runs the real embedded Camel HTTP server twice with identical application code and configuration, changing only the Camel version:4.14.5(vulnerable) and4.14.6(fixed). For each it sends real HTTP requests tohttp://localhost:8080/api/hellowith and without credentials and records the responses. It confirms the bypass when the vulnerable build returns200without credentials while the fixed build returns401without credentials, then writesbundle/repro/runtime_manifest.json.
- registers a route
- Expected evidence:
bundle/logs/vulnerable_4.14.5_no_creds.txt→HTTP/1.1 200 OKbodyokbundle/logs/fixed_4.14.6_no_creds.txt→HTTP/1.1 401 UnauthorizedwithWWW-Authenticate: Basic realm="vertx-web"bundle/logs/vulnerable_4.14.5_app.logandfixed_4.14.6_app.logshowingcamel.server.authenticationEnabled = true,camel.server.path = /api,camel.server.basicPropertiesFile = auth.properties, andVert.x HttpServer started on 0.0.0.0:8080for the respective version.bundle/repro/runtime_manifest.jsonwithservice_started,healthcheck_passed, andtarget_path_reachedalltrue.
Evidence
bundle/logs/reproduction_summary.log— contrast table and verdict.bundle/logs/vulnerable_4.14.5_no_creds.txt:HTTP/1.1 200 OK transfer-encoding: chunked okbundle/logs/fixed_4.14.6_no_creds.txt:HTTP/1.1 401 Unauthorized WWW-Authenticate: Basic realm="vertx-web" content-length: 12 Unauthorizedbundle/logs/vulnerable_4.14.5_app.log(key lines):... camel.server.authenticationEnabled = true ... camel.server.basicPropertiesFile = auth.properties ... camel.server.path = /api ... Apache Camel 4.14.5 (camel-1) is starting ... Vert.x HttpServer started on 0.0.0.0:8080 ... Apache Camel 4.14.5 (camel-1) started in 149msbundle/logs/fixed_4.14.6_app.log(key lines):... camel.server.authenticationEnabled = true ... camel.server.basicPropertiesFile = auth.properties ... camel.server.path = /api ... Apache Camel 4.14.6 (camel-1) is starting ... Vert.x HttpServer started on 0.0.0.0:8080 ... Apache Camel 4.14.6 (camel-1) started in 154ms- Both
with_credsprobes return200 OK, proving credentials are accepted and the route itself is healthy. - Environment: OpenJDK 17.0.19, Apache Maven 3.9.12, Apache Camel
camel-platform-http-main4.14.5 / 4.14.6 (Vert.x 4.5.24 engine), Linux x86_64.
Recommendations / Next Steps
- Upgrade
camel-platform-http-mainto 4.14.6 (4.14.x LTS), 4.18.2 (4.18.x LTS), or 4.20.0 as appropriate. - Defense in depth: explicitly set
camel.server.authenticationPath=/*(andcamel.management.authenticationPath=/*) even on patched versions so protection does not depend on the default-resolution behavior. - Audit: review any deployed Camel Main apps using a non-root
camel.server.path/camel.management.pathwith authentication enabled but no explicitauthenticationPath; those are the exposed instances. - Regression test: add an integration test in Camel that asserts an
unauthenticated request to a subpath under a non-root context path returns
401when authentication is enabled (this run's contrast is a direct template: vulnerable200vs fixed401).
Additional Notes
- Idempotency:
reproduction_steps.shwas run twice consecutively; both runs exited0and reproduced the identical contrast (vulnerable 200/fixed 401). The script frees port 8080 and rebuilds cleanly each run. - Real product, not a mock: the proof runs the actual
org.apache.camel.main.Mainembedded HTTP server (Vert.x/Netty) and drives it with realcurlHTTP requests over localhost — a genuineapi_remoteboundary. - Property note: the ticket's reproduction text references
camel.server.authenticationMechanism=basicandcamel.server.authenticationUsers[0].username/password. Those properties do not exist in the vulnerable 4.14.x / 4.18.x releases; the real basic-auth mechanism in those versions is selected by settingcamel.server.basicPropertiesFile(a Vert.xPropertyFileAuthenticationfile), which is what this reproduction uses. The authentication-bypass root cause is identical regardless of how credentials are configured. - Exact-context-path behavior: on the vulnerable build a request to the
exact context path
/api(no creds) returns404, not401, because the auth handler registered at the literal/apinever matches a relative (prefix-stripped) sub-router path — so in practice no path is protected, making the bypass total. The fixed build returns401for both/apiand/api/hellobecause the handler is registered at/*.
CVE-2026-40022 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Full session Replay every step — scrub the timeline or play it back.
echo "=== Java ===" && (java -version 2>&1 | head -3); echo "=== Maven ===" && (mvn -version 2>&1 | head -3); echo "=== javac ===" && (javac -version 2>&1); echo "=== curl ===" && (curl --version 2>&1 | head -1); echo "=== jq ===" && (jq --version 2>&1); echo "=== docker ===" && (docker --version 2>&1 || echo "no docker")=== Java === openjdk version "17.0.19" 2026-04-21 OpenJDK Runtime Environment (build 17.0.19+10-1-26.04.2-Ubuntu) OpenJDK 64-Bit Server VM (build 17.0.19+10-1-26.04.2-Ubuntu, mixed mode, sharing) === Maven === [1mApache Maven 3.9.12[m Maven home: /usr/share/maven Java version: 17.0.19, vendor: Ubuntu, runtime: /usr/lib/jvm/java-17-openjdk-amd64
Artifacts and Evidence for CVE-2026-40022
Scripts, logs, diffs, and output captured during the reproduction.
How to Fix CVE-2026-40022
Upgrade org.apache.camel:camel-platform-http-main · maven to 4.14.6 / 4.18.2 / 4.20.0 or later.
FAQ: CVE-2026-40022
How does the CVE-2026-40022 authentication bypass work?
Which Camel versions are affected by CVE-2026-40022, and where is it fixed?
How severe is CVE-2026-40022?
How can I reproduce CVE-2026-40022?
References for CVE-2026-40022
Authoritative sources for CVE-2026-40022 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.