Vulnerabilities in pkg:maven/com.wire/lithium

PACKAGE
Advisory Summary

GHSA-f36p-42jv-8rh2 is a HIGH (CVSS 8.1) lithium vulnerable to cross site vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Lithium libraries in the Maven ecosystem. The issue involves lithium vulnerable to cross site scripting in provided swagger-ui. Remediation is available by upgrading affected packages to version 3.4.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.wire/lithium

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.wire/lithium. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-f36p-42jv-8rh2 - HIGH Lithium vulnerable to Cross Site Scripting in provided Swagger-UI

GHSA-f36p-42jv-8rh2 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-f36p-42jv-8rh2
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Lithium
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/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 Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-f36p-42jv-8rh2

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

com.wire:lithium fixed: 3.4.2
<dependency>
    <groupId>com.wire</groupId>
    <artifactId>lithium</artifactId>
    <version>3.4.2</version>
</dependency>
com.wire.bots:lithium fixed: Latest secure release
<dependency>
    <groupId>com.wire.bots</groupId>
    <artifactId>lithium</artifactId>
    <version>Latest secure release</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=com.wire

How to Check if You Are Affected

To determine whether your Java application is affected by GHSA-f36p-42jv-8rh2, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.wire

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

Note: The mvn dependency:tree -Dincludes=com.wire 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 Lithium, 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

### Impact A XSS vulnerability in the provided (outdated) Swagger-UI is exploitable in applications using lithium with Swagger-UI enabled. This allows an attacker gain Remote Code Execution (RCE) and potentially exfiltrate secrets in the context of this swagger session. ### Patches The used swagger-ui was updated by switching to the latest version of dropwizard-swagger in 8b9b406d608fe482ec0e7adf8705834bca92d7df ### Workarounds The risk of injected external content can be reduced by setting up a [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy). ### References * https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers/ ### Credits We thank [Mohit Kumar](https://www.linkedin.com/in/mohit-kumar-4ab6b3bb) for reporting this vulnerability!

GHSA-f36p-42jv-8rh2 Affected Lithium Versions

2 component(s)
Fixed Versions:
3.4.2
Product / Package Ecosystem Affected Versions Fixed Version
com.wire:lithium
Maven
< 3.4.2
3.4.2
com.wire.bots:lithium
Maven

References

Frequently Asked Questions

What is GHSA-f36p-42jv-8rh2?
GHSA-f36p-42jv-8rh2 is a security vulnerability in Lithium involving Lithium vulnerable to Cross Site Scripting in provided Swagger-UI under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Lithium versions are affected?
Affected versions include releases prior to 3.4.2 across affected packages: com.wire:lithium, com.wire.bots:lithium.
What version fixes GHSA-f36p-42jv-8rh2?
Upgrading to 3.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lithium affected?
Yes, com.wire:lithium is affected in releases prior to 3.4.2, Latest secure release. Upgrade your dependency to 3.4.2, Latest secure release or later.
What is the CVSS score of GHSA-f36p-42jv-8rh2?
GHSA-f36p-42jv-8rh2 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-f36p-42jv-8rh2?
GHSA-f36p-42jv-8rh2 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 GHSA-f36p-42jv-8rh2?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.wire'. 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-f36p-42jv-8rh2",
  "modified" : "2022-10-05T22:00:04Z",
  "published" : "2022-09-30T04:53:37Z",
  "aliases" : [ ],
  "summary" : "Lithium vulnerable to Cross Site Scripting in provided Swagger-UI",
  "details" : "### Impact\nA  XSS vulnerability in the provided (outdated) Swagger-UI is exploitable in applications using lithium with Swagger-UI enabled.\nThis allows an attacker gain Remote Code Execution (RCE) and potentially exfiltrate secrets in the context of this swagger session.\n\n\n### Patches\nThe used swagger-ui was updated by switching to the latest version of dropwizard-swagger in 8b9b406d608fe482ec0e7adf8705834bca92d7df\n\n\n### Workarounds\nThe risk of injected external content can be reduced by setting up a [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy).\n\n\n### References\n* https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers/\n\n\n### Credits\nWe thank [Mohit Kumar](https://www.linkedin.com/in/mohit-kumar-4ab6b3bb) for reporting this vulnerability!\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.wire:lithium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.wire.bots:lithium"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 3.4.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/wireapp/lithium/security/advisories/GHSA-f36p-42jv-8rh2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wireapp/lithium/commit/8b9b406d608fe482ec0e7adf8705834bca92d7df"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wireapp/lithium"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-30T04:53:37Z",
    "nvd_published_at" : null
  }
}