GHSA-2m96-52r3-2f3g

Suggest an improvement
Source
https://github.com/advisories/GHSA-2m96-52r3-2f3g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/08/GHSA-2m96-52r3-2f3g/GHSA-2m96-52r3-2f3g.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2m96-52r3-2f3g
Aliases
Related
Published
2024-08-19T17:29:36Z
Modified
2024-08-21T15:15:00.066130Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
  • 5.3 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
fugit parse and parse_nat stall on lengthy input
Details

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

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

Database specific
{
    "nvd_published_at": "2024-08-19T15:15:08Z",
    "cwe_ids": [
        "CWE-400"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-08-19T17:29:36Z"
}
References

Affected packages

RubyGems / fugit

Package

Name
fugit
Purl
pkg:gem/fugit

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.11.1

Affected versions

0.*

0.1.0
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6

1.*

1.0.0
1.1.0
1.1.1
1.1.2
1.1.3
1.1.4
1.1.5
1.1.6
1.1.7
1.1.8
1.1.9
1.1.10
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
1.3.8
1.3.9
1.4.0
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.5.0
1.5.1
1.5.2
1.5.3
1.6.0
1.7.0
1.7.1
1.7.2
1.8.0
1.8.1
1.9.0
1.10.0
1.10.1
1.11.0