5.3medium
Apache Camel: Camel-Elasticsearch-Rest-Client: Exchange header constants without the Camel prefix bypass inbound HTTP header filtering, allowing untrusted clients to override the Elasticsearch query and operation
- Severity
- 5.3medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.73% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- apache
- Also known as
- GHSA-rp9m-hfv5-pfvr
Description
Improper Input Validation, Authorization Bypass Through User-Controlled Key vulnerability in Apache Camel ElasticSearch Rest Client. The camel-elasticsearch-rest-client component reads several Exchange headers to control its behaviour - SEARCH_QUERY (an advanced query body), OPERATION (which Elasticsearch operation to run), INDEX_NAME, INDEX_SETTINGS and ID. The string values of these header constants, defined in ElasticSearchRestClientConstant, are plain unprefixed names ('SEARCH_QUERY', 'OPERATION', 'INDEX_NAME', 'INDEX_SETTINGS', 'ID') rather than the 'Camel'-prefixed names used by every other Camel component (for example CamelSqlQuery, CamelMongoDbCriteria, CamelCqlQuery). Camel's inbound HTTP header filter, HttpHeaderFilterStrategy, blocks only header names that begin with 'Camel' or 'camel'. Because the Elasticsearch header names do not carry that prefix, they pass through the inbound filter unchanged. When a Camel route exposes an HTTP entry point (for example platform-http) in front of an elasticsearch-rest-client producer, an untrusted HTTP client can set these headers directly on its request and override the query and operation that the route author configured: reading every document in the index (SEARCH_QUERY with a match_all query), deleting documents (OPERATION set to Delete together with ID), or exfiltrating selected fields. No credentials are required and the producer reads the headers unconditionally. This issue affects Apache Camel: from 4.3.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0. Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. The fix renames the camel-elasticsearch-rest-client Exchange header constant string values (ID, SEARCH_QUERY, INDEX_SETTINGS, INDEX_NAME, OPERATION) to carry the Camel prefix (CamelElasticsearchId, CamelElasticsearchSearchQuery, CamelElasticsearchIndexSettings, CamelElasticsearchIndexName, CamelElasticsearchOperation) so that they are blocked by the inbound HttpHeaderFilterStrategy; the Java field names are unchanged. For deployments that cannot upgrade immediately, strip the affected headers from untrusted inbound messages before they reach the producer (for example removeHeader('SEARCH_QUERY'), removeHeader('OPERATION'), removeHeader('INDEX_NAME'), removeHeader('INDEX_SETTINGS') and removeHeader('ID') in front of the elasticsearch-rest-client endpoint), or apply a custom HeaderFilterStrategy that blocks these names.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| org.apache.camel:camel-elasticsearch-rest-client | from 4.3.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0 | CVE List |
| org.apache.camel:camel-elasticsearch-rest-client (Maven) | from 4.3.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0 | GitHub Advisory Database |
| apache camel | from 4.3.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0 | NVD |
All scores
| CISA-ADP | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Classification
What each source says
CVE List
Improper Input Validation, Authorization Bypass Through User-Controlled Key vulnerability in Apache Camel ElasticSearch Rest Client. The camel-elasticsearch-rest-client component reads several Exchange headers to control its behaviour - SEARCH_QUERY (an advanced query body), OPERATION (which Elasticsearch operation to run), INDEX_NAME, INDEX_SETTINGS and ID. The string values of these header constants, defined in ElasticSearchRestClientConstant, are plain unprefixed names ('SEARCH_QUERY', 'OPERATION', 'INDEX_NAME', 'INDEX_SETTINGS', 'ID') rather than the 'Camel'-prefixed names used by every other Camel component (for example CamelSqlQuery, CamelMongoDbCriteria, CamelCqlQuery). Camel's inbound HTTP header filter, HttpHeaderFilterStrategy, blocks only header names that begin with 'Camel' or 'camel'. Because the Elasticsearch header names do not carry that prefix, they pass through the inbound filter unchanged. When a Camel route exposes an HTTP entry point (for example platform-http) in front of an elasticsearch-rest-client producer, an untrusted HTTP client can set these headers directly on its request and override the query and operation that the route author configured: reading every document in the index (SEARCH_QUERY with a match_all query), deleting documents (OPERATION set to Delete together with ID), or exfiltrating selected fields. No credentials are required and the producer reads the headers unconditionally. This issue affects Apache Camel: from 4.3.0 before 4.14.8, from 4.15.0 before 4.18.3, from 4.19.0 before 4.21.0. Users are recommended to upgrade to version 4.21.0, which fixes the issue. If users are on the 4.14.x LTS releases stream, then they are suggested to upgrade to 4.14.8. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.3. The fix renames the camel-elasticsearch-rest-client Exchange header constant string values (ID, SEARCH_QUERY, INDEX_SETTINGS, INDEX_NAME, OPERATION) to carry the Camel prefix (CamelElasticsearchId, CamelElasticsearchSearchQuery, CamelElasticsearchIndexSettings, CamelElasticsearchIndexName, CamelElasticsearchOperation) so that they are blocked by the inbound HttpHeaderFilterStrategy; the Java field names are unchanged. For deployments that cannot upgrade immediately, strip the affected headers from untrusted inbound messages before they reach the producer (for example removeHeader('SEARCH_QUERY'), removeHeader('OPERATION'), removeHeader('INDEX_NAME'), removeHeader('INDEX_SETTINGS') and removeHeader('ID') in front of the elasticsearch-rest-client endpoint), or apply a custom HeaderFilterStrategy that blocks these names.
NVD (es)
Validación de entrada incorrecta, vulnerabilidad de omisión de autorización a través de clave controlada por el usuario en Apache Camel ElasticSearch Rest Client. El componente camel-elasticsearch-rest-client lee varias cabeceras de Exchange para controlar su comportamiento - SEARCH_QUERY (un cuerpo de consulta avanzado), OPERATION (qué operación de Elasticsearch ejecutar), INDEX_NAME, INDEX_SETTINGS e ID. Los valores de cadena de estas constantes de cabecera, definidas en ElasticSearchRestClientConstant, son nombres simples sin prefijo (’SEARCH_QUERY’, ’OPERATION’, ’INDEX_NAME’, ’INDEX_SETTINGS’, ’ID’) en lugar de los nombres con prefijo ’Camel’ utilizados por cualquier otro componente de Camel (por ejemplo, CamelSqlQuery, CamelMongoDbCriteria, CamelCqlQuery). El filtro de cabeceras HTTP de entrada de Camel, HttpHeaderFilterStrategy, bloquea solo los nombres de cabecera que comienzan con ’Camel’ o ’camel’. Debido a que los nombres de las cabeceras de Elasticsearch no llevan ese prefijo, pasan a través del filtro de entrada sin cambios. Cuando una ruta de Camel expone un punto de entrada HTTP (por ejemplo, platform-http) delante de un productor elasticsearch-rest-client, un cliente HTTP no confiable puede establecer estas cabeceras directamente en su solicitud y anular la consulta y la operación que el autor de la ruta configuró: leyendo cada documento en el índice (SEARCH_QUERY con una consulta match_all), eliminando documentos (OPERATION establecido en Delete junto con ID), o exfiltrando campos seleccionados. No se requieren credenciales y el productor lee las cabeceras incondicionalmente. Este problema afecta a Apache Camel: desde 4.3.0 antes de 4.14.8, desde 4.15.0 antes de 4.18.3, desde 4.19.0 antes de 4.21.0. Se recomienda a los usuarios actualizar a la versión 4.21.0, que corrige el problema. Si los usuarios están en la rama de versiones LTS 4.14.x, entonces se sugiere que actualicen a 4.14.8. Si los usuarios están en la rama de versiones 4.18.x, entonces se sugiere que actualicen a 4.18.3. La corrección renombra los valores de cadena constantes de las cabeceras de Exchange de camel-elasticsearch-rest-client (ID, SEARCH_QUERY, INDEX_SETTINGS, INDEX_NAME, OPERATION) para que lleven el prefijo Camel (CamelElasticsearchId, CamelElasticsearchSearchQuery, CamelElasticsearchIndexSettings, CamelElasticsearchIndexName, CamelElasticsearchOperation) para que sean bloqueados por el HttpHeaderFilterStrategy de entrada; los nombres de los campos Java no se modifican. Para implementaciones que no pueden actualizarse inmediatamente, elimine las cabeceras afectadas de los mensajes de entrada no confiables antes de que lleguen al productor (por ejemplo, removeHeader(’SEARCH_QUERY’), removeHeader(’OPERATION’), removeHeader(’INDEX_NAME’), removeHeader(’INDEX_SETTINGS’) y removeHeader(’ID’) delante del punto final elasticsearch-rest-client), o aplique una HeaderFilterStrategy personalizada que bloquee estos nombres.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-46453 changed 2026-07-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rp9m-hfv5-pfvr changed 2026-08-26 | CC-BY-4.0 |
| NVD | CVE-2026-46453 changed 2026-10-25 | Public domain |