CVE-2024-5165: Ditto Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-hjfc-6jxr-j2rx
CVSS 6.5
CWE-79
Published
Advisory Summary

CVE-2024-5165 is a MODERATE (CVSS 6.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Ditto libraries in the Maven ecosystem. The issue involves eclipse ditto vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 3.4.5, 3.5.6.

CVE-2024-5165 at a Glance

CVE Identifier CVE-2024-5165
GHSA Identifier GHSA-hjfc-6jxr-j2rx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Ditto
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2024-5165

To remediate this vulnerability, upgrade all affected Ditto 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.eclipse.ditto:ditto fixed: 3.4.5
<dependency>
    <groupId>org.eclipse.ditto</groupId>
    <artifactId>ditto</artifactId>
    <version>3.4.5</version>
</dependency>
org.eclipse.ditto:ditto fixed: 3.5.6
<dependency>
    <groupId>org.eclipse.ditto</groupId>
    <artifactId>ditto</artifactId>
    <version>3.5.6</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.eclipse.ditto

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.eclipse.ditto

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

Note: The mvn dependency:tree -Dincludes=org.eclipse.ditto 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Ditto, 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

In Eclipse Ditto starting in version 3.0.0 and prior to versions 3.4.5 and 3.5.6, the user input of several input fields of the Eclipse Ditto Explorer User Interface https://eclipse.dev/ditto/user-interface.html was not properly neutralized and thus vulnerable to both Reflected and Stored XSS (Cross Site Scripting). Several inputs were not persisted at the backend of Eclipse Ditto, but only in local browser storage to save settings of "environments" of the UI and e.g. the last performed "search queries", resulting in a "Reflected XSS" vulnerability. However, several other inputs were persisted at the backend of Eclipse Ditto, leading to a "Stored XSS" vulnerability. Those mean that authenticated and authorized users at Eclipse Ditto can persist Things in Ditto which can - when being displayed by other users also being authorized to see those Things in the Eclipse Ditto UI - cause scripts to be executed in the browser of other users.

CVE-2024-5165 Affected Ditto Versions

2 component(s)
Fixed Versions:
3.4.53.5.6
Product / Package Ecosystem Affected Versions Fixed Version
org.eclipse.ditto:ditto
Maven
≥ 3.0.0
< 3.4.5
3.4.5
org.eclipse.ditto:ditto
Maven
≥ 3.5.0
< 3.5.6
3.5.6

References

NVD — CVE-2024-5165 NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-5165
Security Fix Commit FIX COMMIT
https://github.com/eclipse-ditto/ditto/commit/20399a0ab9ef219c7833c24cf8140ddfb298788d
Security Fix Commit FIX COMMIT
https://github.com/eclipse-ditto/ditto/commit/8fe1b3b9e0e2c333856dc166c8c3c7d2027c856d
Security Fix Commit FIX COMMIT
https://github.com/eclipse-ditto/ditto/commit/9d1bac36ca7be94516635ef71eedfea6df1e77f4
Security Fix Commit FIX COMMIT
https://github.com/eclipse-ditto/ditto/commit/cce2e961db08b5d591ef34920c61a0f7e7d810e4
eclipse.dev/ditto/release_notes... WEB
https://eclipse.dev/ditto/release_notes_345.html
eclipse.dev/ditto/release_notes... WEB
https://eclipse.dev/ditto/release_notes_356.html
Ditto Source Repository REPOSITORY
https://github.com/eclipse-ditto/ditto
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/cve-assignement/-/issues/23
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/201
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/202
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/204
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/207
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/209
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/210
Ditto Security Information SECURITY
https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/211

Frequently Asked Questions

What is CVE-2024-5165?
CVE-2024-5165 is a security vulnerability in Ditto involving Eclipse Ditto vulnerable to Cross-site Scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Ditto versions are affected?
Affected versions include releases prior to 3.4.5, 3.5.6 across affected packages: org.eclipse.ditto:ditto.
What version fixes CVE-2024-5165?
Upgrading to 3.4.5, 3.5.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ditto affected?
Yes, org.eclipse.ditto:ditto is affected in releases prior to 3.4.5, 3.5.6. Upgrade your dependency to 3.4.5, 3.5.6 or later.
What is the CVSS score of CVE-2024-5165?
CVE-2024-5165 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-5165?
CVE-2024-5165 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2024-5165?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.eclipse.ditto'. 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-hjfc-6jxr-j2rx",
  "modified" : "2024-05-23T14:23:32Z",
  "published" : "2024-05-23T12:31:02Z",
  "aliases" : [ "CVE-2024-5165" ],
  "summary" : "Eclipse Ditto vulnerable to Cross-site Scripting",
  "details" : "In Eclipse Ditto starting in version 3.0.0 and prior to versions 3.4.5 and 3.5.6, the user input of several input fields of the Eclipse  Ditto Explorer User Interface https://eclipse.dev/ditto/user-interface.html  was not properly neutralized and thus vulnerable to both Reflected and Stored XSS (Cross Site Scripting).\n\nSeveral inputs were not persisted at the backend of Eclipse Ditto, but only in local browser storage to save settings of \"environments\" of the UI and e.g. the last performed \"search queries\", resulting in a \"Reflected XSS\" vulnerability.\n\nHowever, several other inputs were persisted at the backend of Eclipse Ditto, leading to a \"Stored XSS\" vulnerability. Those mean that authenticated and authorized users at Eclipse Ditto can persist Things in Ditto which can - when being displayed by other users also being authorized to see those Things in the Eclipse Ditto UI - cause scripts to be executed in the browser of other users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.ditto:ditto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.4.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.eclipse.ditto:ditto"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.5.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5165"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-ditto/ditto/commit/20399a0ab9ef219c7833c24cf8140ddfb298788d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-ditto/ditto/commit/8fe1b3b9e0e2c333856dc166c8c3c7d2027c856d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-ditto/ditto/commit/9d1bac36ca7be94516635ef71eedfea6df1e77f4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-ditto/ditto/commit/cce2e961db08b5d591ef34920c61a0f7e7d810e4"
  }, {
    "type" : "WEB",
    "url" : "https://eclipse.dev/ditto/release_notes_345.html"
  }, {
    "type" : "WEB",
    "url" : "https://eclipse.dev/ditto/release_notes_356.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse-ditto/ditto"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/cve-assignement/-/issues/23"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/201"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/202"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/204"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/207"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/209"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/210"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/211"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-23T14:23:32Z",
    "nvd_published_at" : "2024-05-23T10:15:10Z"
  }
}