CVE-2024-43380: Fugit Fugit Parse And Parse_nat Stall Vulnerability

MODERATE
Advisory Identifier: GHSA-2m96-52r3-2f3g
CVSS 5.3
CWE-400
Published
Advisory Summary

CVE-2024-43380 is a MODERATE (CVSS 5.3) fugit parse and parse_nat stall vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Fugit libraries in the RubyGems ecosystem. The issue involves fugit parse and parse_nat stall on lengthy input. Remediation is available by upgrading affected packages to version 1.11.1.

CVE-2024-43380 at a Glance

CVE Identifier CVE-2024-43380
GHSA Identifier GHSA-2m96-52r3-2f3g
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Fugit
Package Ecosystem RubyGems
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:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

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

How to Fix CVE-2024-43380

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

fugit fixed: 1.11.1
Upgrade fugit to 1.11.1
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 fugit

How to Check if You Are Affected

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

inspect dependencies for fugit

Analyze the terminal output to locate any version of Fugit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.1), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Fugit, 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 The fugit "natural" parser, that turns "every wednesday at 5pm" into "0 17 * * 3", accepted any length of input and went on attempting to parse it, not returning promptly, as expected. The parse call could hold the thread with no end in sight. Fugit dependents that do not check (user) input length for plausability are impacted. ### Patches Problem was reported in #104 and the fix was released in [fugit 1.11.1](https://rubygems.org/gems/fugit/versions/1.11.1) ### Workarounds By making sure that `Fugit.parse(s)`, `Fugit.do_parse(s)`, `Fugit.parse_nat(s)`, `Fugit.do_parse_nat(s)`, `Fugit::Nat.parse(s)`, and `Fugit::Nat.do_parse(s)` are not fed strings too long. 1000 chars feels ok, while 10_000 chars makes it stall. In fewer words, making sure those fugit methods are not fed unvetted input strings. ### References gh-104

CVE-2024-43380 Affected Fugit Versions

1 component(s)
Fixed Versions:
1.11.1
Product / Package Ecosystem Affected Versions Fixed Version
fugit
RubyGems
< 1.11.1
1.11.1

References

Frequently Asked Questions

What is CVE-2024-43380?
CVE-2024-43380 is a security vulnerability in Fugit involving fugit parse and parse_nat stall on lengthy input under CWE-400: Uncontrolled Resource Consumption.
Which Fugit versions are affected?
Affected versions include releases prior to 1.11.1 across affected packages: fugit.
What version fixes CVE-2024-43380?
Upgrading to 1.11.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fugit affected?
Yes, fugit is affected in releases prior to 1.11.1. Upgrade your dependency to 1.11.1 or later.
What is the CVSS score of CVE-2024-43380?
CVE-2024-43380 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-43380?
CVE-2024-43380 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2024-43380?
Run the dependency tree command: 'inspect dependencies for fugit'. 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-2m96-52r3-2f3g",
  "modified" : "2024-08-21T14:55:22Z",
  "published" : "2024-08-19T17:29:36Z",
  "aliases" : [ "CVE-2024-43380" ],
  "summary" : "fugit parse and parse_nat stall on lengthy input",
  "details" : "### Impact\n\nThe fugit \"natural\" parser, that turns \"every wednesday at 5pm\" into \"0 17 * * 3\", accepted any length of input and went on attempting to parse it, not returning promptly, as expected. The parse call could hold the thread with no end in sight.\n\nFugit dependents that do not check (user) input length for plausability are impacted.\n\n### Patches\n\nProblem was reported in #104 and the fix was released in [fugit 1.11.1](https://rubygems.org/gems/fugit/versions/1.11.1)\n\n### Workarounds\n\nBy making sure that `Fugit.parse(s)`, `Fugit.do_parse(s)`, `Fugit.parse_nat(s)`, `Fugit.do_parse_nat(s)`, `Fugit::Nat.parse(s)`, and `Fugit::Nat.do_parse(s)` are not fed strings too long. 1000 chars feels ok, while 10_000 chars makes it stall.\n\nIn fewer words, making sure those fugit methods are not fed unvetted input strings.\n\n### References\n\ngh-104\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "fugit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/floraison/fugit/security/advisories/GHSA-2m96-52r3-2f3g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43380"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/floraison/fugit/issues/104"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/floraison/fugit/commit/ad2c1c9c737213d585fff0b51c927d178b2c05a5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/floraison/fugit"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/fugit/CVE-2024-43380.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-19T17:29:36Z",
    "nvd_published_at" : "2024-08-19T15:15:08Z"
  }
}