CVE-2017-5643: Camel core Apache Camel's Validation Component Is Vulnerability

HIGH
Advisory Identifier: GHSA-vq9j-jh62-5hmp
CVSS 7.4
CWE-918
Published
Advisory Summary

CVE-2017-5643 is a HIGH (CVSS 7.4) apache camel's validation component is vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Camel core libraries in the Maven ecosystem. The issue involves apache camel's validation component is vulnerable against ssrf via remote dtds and xxe.. Remediation is available by upgrading affected packages to version 2.17.6, 2.18.2.

CVE-2017-5643 at a Glance

CVE Identifier CVE-2017-5643
GHSA Identifier GHSA-vq9j-jh62-5hmp
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Camel core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2017-5643

To remediate this vulnerability, upgrade all affected Camel core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.camel:camel-core fixed: 2.17.6
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>2.17.6</version>
</dependency>
org.apache.camel:camel-core fixed: 2.18.2
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>2.18.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.camel

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2017-5643, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.camel

Analyze the terminal output to locate any version of Camel core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.17.6), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.camel command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Camel core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Description: The Validation Component of Apache Camel evaluates DTD headers of XML stream sources, although a validation against XML schemas (XSD) is executed. Remote attackers can use this feature to make Server-Side Request Forgery (SSRF) attacks by sending XML documents with remote DTDs URLs or XML External Entities (XXE). The vulnerability is not given for SAX or StAX sources. Mitigation: 2.17.x users should upgrade to 2.17.6, 2.18.x users should upgrade to 2.18.3. The JIRA tickets https://issues.apache.org/jira/browse/CAMEL-10894 refers to the various commits that resolved the issue, and have more details.

CVE-2017-5643 Affected Camel core Versions

2 component(s)
Fixed Versions:
2.17.62.18.2
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.camel:camel-core
Maven
< 2.17.6
2.17.6
org.apache.camel:camel-core
Maven
≥ 2.18.0
< 2.18.2
2.18.2

References

Frequently Asked Questions

What is CVE-2017-5643?
CVE-2017-5643 is a security vulnerability in Camel core involving Apache Camel's Validation Component is vulnerable against SSRF via remote DTDs and XXE. under CWE-918: Server-Side Request Forgery (SSRF).
Which Camel core versions are affected?
Affected versions include releases prior to 2.17.6, 2.18.2 across affected packages: org.apache.camel:camel-core.
What version fixes CVE-2017-5643?
Upgrading to 2.17.6, 2.18.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is camel-core affected?
Yes, org.apache.camel:camel-core is affected in releases prior to 2.17.6, 2.18.2. Upgrade your dependency to 2.17.6, 2.18.2 or later.
What is the CVSS score of CVE-2017-5643?
CVE-2017-5643 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2017-5643?
CVE-2017-5643 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Maven dependencies for CVE-2017-5643?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.camel'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vq9j-jh62-5hmp",
  "modified" : "2023-12-19T22:22:28Z",
  "published" : "2018-10-16T23:13:11Z",
  "aliases" : [ "CVE-2017-5643" ],
  "summary" : "Apache Camel's Validation Component is vulnerable against SSRF via remote DTDs and XXE.",
  "details" : "Description: The Validation Component of Apache Camel evaluates DTD headers of XML stream sources, although a validation against XML schemas (XSD) is executed. Remote attackers can use this feature to make Server-Side Request Forgery (SSRF) attacks by sending XML documents with remote DTDs URLs or XML External Entities (XXE).  The vulnerability is not given for SAX or StAX sources.\n\nMitigation: 2.17.x users should upgrade to 2.17.6, 2.18.x users should upgrade to 2.18.3. \n\nThe JIRA tickets https://issues.apache.org/jira/browse/CAMEL-10894 refers to the various commits that resolved the issue, and have more details.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.camel:camel-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.17.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.camel:camel-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.18.0"
      }, {
        "fixed" : "2.18.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-5643"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/commit/2c6964ae94d8f9a9c9a32e5ae5a0b794e8b8d3be"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/commit/8afc5d1757795fde715902067360af5d90f046da"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel/commit/9f7376abbff7434794f2c7c2909e02bac232fb5b"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:1832"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vq9j-jh62-5hmp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/camel"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/CAMEL-10894"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/2318d7f7d87724d8716cd650c21b31cb06e4d34f6d0f5ee42f28fdaf@%3Ccommits.camel.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/b4014ea7c5830ca1fc28edd5cafedfe93ad4af2d9e69c961c5def31d@%3Ccommits.camel.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "http://camel.apache.org/security-advisories.data/CVE-2017-5643.txt.asc?version=1&modificationDate=1489652454000&api=v2"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/97226"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:58:03Z",
    "nvd_published_at" : null
  }
}