CVE-2024-13941: Ouch Ouch Improper Restriction Of Operations Vulnerability

MODERATE
Advisory Identifier: GHSA-6xfj-hhwh-r3c2
CVSS 5.3
CWE-119
Published
Advisory Summary

CVE-2024-13941 is a MODERATE (CVSS 5.3) ouch improper restriction of operations vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Ouch libraries in the crates.io ecosystem. The issue involves ouch improper restriction of operations within the bounds of a memory buffer vulnerability. Remediation is available by upgrading affected packages to version 0.4.0.

CVE-2024-13941 at a Glance

CVE Identifier CVE-2024-13941
GHSA Identifier GHSA-6xfj-hhwh-r3c2
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Ouch
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix CVE-2024-13941

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

ouch fixed: 0.4.0
Upgrade ouch to 0.4.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for ouch

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-13941, inspect your project dependencies for Ouch:

inspect dependencies for ouch

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Ouch, 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

A vulnerability was found in ouch-org ouch up to 0.3.1. It has been classified as critical. This affects the function ouch::archive::zip::convert_zip_date_time of the file zip.rs. The manipulation of the argument month leads to memory corruption. The attack needs to be approached locally. The exploit has been disclosed to the public and may be used. Upgrading to version 0.4.0 is able to address this issue. It is recommended to upgrade the affected component.

CVE-2024-13941 Affected Ouch Versions

1 component(s)
Fixed Versions:
0.4.0
Product / Package Ecosystem Affected Versions Fixed Version
ouch
crates.io
< 0.4.0
0.4.0

References

Frequently Asked Questions

What is CVE-2024-13941?
CVE-2024-13941 is a security vulnerability in Ouch involving Ouch Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Ouch versions are affected?
Affected versions include releases prior to 0.4.0 across affected packages: ouch.
What version fixes CVE-2024-13941?
Upgrading to 0.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ouch affected?
Yes, ouch is affected in releases prior to 0.4.0. Upgrade your dependency to 0.4.0 or later.
What is the CVSS score of CVE-2024-13941?
CVE-2024-13941 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2024-13941?
CVE-2024-13941 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check crates.io dependencies for CVE-2024-13941?
Run the dependency tree command: 'inspect dependencies for ouch'. 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-6xfj-hhwh-r3c2",
  "modified" : "2025-04-02T00:15:07Z",
  "published" : "2025-04-01T21:31:30Z",
  "aliases" : [ "CVE-2024-13941" ],
  "summary" : "Ouch Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability",
  "details" : "A vulnerability was found in ouch-org ouch up to 0.3.1. It has been classified as critical. This affects the function ouch::archive::zip::convert_zip_date_time of the file zip.rs. The manipulation of the argument month leads to memory corruption. The attack needs to be approached locally. The exploit has been disclosed to the public and may be used. Upgrading to version 0.4.0 is able to address this issue. It is recommended to upgrade the affected component.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "ouch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-13941"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ouch-org/ouch/issues/707"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rustsec/advisory-db/pull/2084/files"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ouch-org/ouch"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ouch-org/ouch/releases/tag/0.4.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/user-attachments/files/16767988/ouch.crash.report.docx"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.302055"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.302055"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.524511"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-02T00:15:07Z",
    "nvd_published_at" : "2025-04-01T21:15:41Z"
  }
}