Vulnerabilities in pkg:maven/com.squareup.okio/okio-jvm

PACKAGE
Advisory Identifier: GHSA-w33c-445m-f8w7
Advisory Summary

CVE-2023-3635 is a MODERATE (CVSS 5.9) okio signed to unsigned conversion vulnerability (CWE-681: Incorrect Conversion between Numeric Types) affecting Okio libraries in the Maven ecosystem. The issue involves okio signed to unsigned conversion error vulnerability. Remediation is available by upgrading affected packages to version 3.4.0, 1.17.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.squareup.okio/okio-jvm

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.squareup.okio/okio-jvm. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-w33c-445m-f8w7 CVE-2023-3635 MODERATE Okio Signed to Unsigned Conversion Error vulnerability

CVE-2023-3635 at a Glance

CVE Identifier CVE-2023-3635
GHSA Identifier GHSA-w33c-445m-f8w7
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-681: Incorrect Conversion between Numeric Types
Affected Product Okio
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2023-3635

To remediate this vulnerability, upgrade all affected Okio 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.squareup.okio:okio fixed: 3.4.0
<dependency>
    <groupId>com.squareup.okio</groupId>
    <artifactId>okio</artifactId>
    <version>3.4.0</version>
</dependency>
com.squareup.okio:okio fixed: 1.17.6
<dependency>
    <groupId>com.squareup.okio</groupId>
    <artifactId>okio</artifactId>
    <version>1.17.6</version>
</dependency>
com.squareup.okio:okio-jvm fixed: 3.4.0
<dependency>
    <groupId>com.squareup.okio</groupId>
    <artifactId>okio-jvm</artifactId>
    <version>3.4.0</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.squareup.okio

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.squareup.okio

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

Note: The mvn dependency:tree -Dincludes=com.squareup.okio 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-681: Incorrect Conversion between Numeric Types, where when converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. if the resulting values are used in a sensitive context, then dangerous behaviors may occur. In Okio, 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

GzipSource does not handle an exception that might be raised when parsing a malformed gzip buffer. This may lead to denial of service of the Okio client when handling a crafted GZIP archive, by using the GzipSource class.

CVE-2023-3635 Affected Okio Versions

3 component(s)
Fixed Versions:
3.4.01.17.6
Product / Package Ecosystem Affected Versions Fixed Version
com.squareup.okio:okio
Maven
≥ 2.0.0-RC1
< 3.4.0
3.4.0
com.squareup.okio:okio
Maven
< 1.17.6
1.17.6
com.squareup.okio:okio-jvm
Maven
≥ 2.0.0-RC1
< 3.4.0
3.4.0

References

Frequently Asked Questions

What is CVE-2023-3635?
CVE-2023-3635 is a security vulnerability in Okio involving Okio Signed to Unsigned Conversion Error vulnerability under CWE-681: Incorrect Conversion between Numeric Types.
Which Okio versions are affected?
Affected versions include releases prior to 3.4.0, 1.17.6 across affected packages: com.squareup.okio:okio, com.squareup.okio:okio-jvm.
What version fixes CVE-2023-3635?
Upgrading to 3.4.0, 1.17.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is okio affected?
Yes, com.squareup.okio:okio is affected in releases prior to 3.4.0, 1.17.6. Upgrade your dependency to 3.4.0, 1.17.6 or later.
Is okio-jvm affected?
Yes, com.squareup.okio:okio-jvm is affected in releases prior to 3.4.0. Upgrade your dependency to 3.4.0 or later.
What is the CVSS score of CVE-2023-3635?
CVE-2023-3635 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-3635?
CVE-2023-3635 is classified under CWE-681: Incorrect Conversion between Numeric Types (When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.).
How can I check Maven dependencies for CVE-2023-3635?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.squareup.okio'. 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-w33c-445m-f8w7",
  "modified" : "2023-07-13T17:01:48Z",
  "published" : "2023-07-12T21:30:50Z",
  "aliases" : [ "CVE-2023-3635" ],
  "summary" : "Okio Signed to Unsigned Conversion Error vulnerability",
  "details" : "GzipSource does not handle an exception that might be raised when parsing a malformed gzip buffer. This may lead to denial of service of the Okio client when handling a crafted GZIP archive, by using the GzipSource class.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.squareup.okio:okio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0-RC1"
      }, {
        "fixed" : "3.4.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.squareup.okio:okio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.17.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.squareup.okio:okio-jvm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0-RC1"
      }, {
        "fixed" : "3.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-3635"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/square/okio/pull/1280"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/square/okio/pull/1334"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/square/okio/commit/81bce1a30af244550b0324597720e4799281da7b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/square/okio/commit/b4fa875dc24950680c386e4b1c593660ce4f7839"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/square/okio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/square/okio/blob/master/CHANGELOG.md#version-1176"
  }, {
    "type" : "WEB",
    "url" : "https://research.jfrog.com/vulnerabilities/okio-gzip-source-unhandled-exception-dos-xray-523195"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-195", "CWE-681" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-13T17:01:48Z",
    "nvd_published_at" : "2023-07-12T19:15:08Z"
  }
}