Vulnerabilities in pkg:gem/asciidoctor
PACKAGECVE-2018-18385 is a HIGH (CVSS 7.5) asciidoctor infinite loop vulnerability vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Asciidoctor libraries in the RubyGems ecosystem. The issue involves asciidoctor infinite loop vulnerability. Remediation is available by upgrading affected packages to version 1.5.8.
pkg:gem/asciidoctor
Vulnerability advisories affecting package pkg:gem/asciidoctor. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-qc9p-mjxm-j2wj | CVE-2018-18385 | HIGH | Asciidoctor Infinite Loop vulnerability |
CVE-2018-18385 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-18385
To remediate this vulnerability, upgrade all affected Asciidoctor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade asciidoctor to 1.5.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for asciidoctor
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-18385, inspect your project dependencies for Asciidoctor:
inspect dependencies for asciidoctor
Analyze the terminal output to locate any version of Asciidoctor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.8), 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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Asciidoctor, 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
CVE-2018-18385 Affected Asciidoctor Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
asciidoctor
|
RubyGems |
< 1.5.8
|
1.5.8
|
References
Frequently Asked Questions
What is CVE-2018-18385?
Which Asciidoctor versions are affected?
What version fixes CVE-2018-18385?
Is asciidoctor affected?
What is the CVSS score of CVE-2018-18385?
What CWE is associated with CVE-2018-18385?
How can I check RubyGems dependencies for CVE-2018-18385?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qc9p-mjxm-j2wj",
"modified" : "2023-01-24T18:32:26Z",
"published" : "2022-05-13T01:50:40Z",
"aliases" : [ "CVE-2018-18385" ],
"summary" : "Asciidoctor Infinite Loop vulnerability",
"details" : "Asciidoctor in versions < 1.5.8 allows remote attackers to cause a denial of service (infinite loop). The loop was caused by the fact that `Parser.next_block` was not exhausting all the lines in the reader as the while loop expected it would. This was happening because the regular expression that detects any list was not agreeing with the regular expression that detects a specific list type. So the line kept getting pushed back onto the reader, hence causing the loop.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "asciidoctor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-18385"
}, {
"type" : "WEB",
"url" : "https://github.com/asciidoctor/asciidoctor/issues/2888"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/asciidoctor/asciidoctor"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/asciidoctor/CVE-2018-18385.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-24T18:32:26Z",
"nvd_published_at" : "2018-10-16T16:50:00Z"
}
}