Loading...
Skip to main content

CVE-2022-24803 — Command Injection vulnerability in...

CRITICAL

Command Injection vulnerability in asciidoctor-include-ext

Published March 31, 2022Updated November 8, 2023Source: osv

Summary

### Impact Applications using [Asciidoctor (Ruby)](https://github.com/asciidoctor/asciidoctor) with [asciidoctor-include-ext](https://github.com/jirutka/asciidoctor-include-ext) (prior to version 0.4.0), which render user-supplied input in AsciiDoc markup, may allow an attacker to execute arbitrary system commands on the host operating system. ~~This attack is possible even when `allow-uri-read` is disabled!~~ (EDIT: it’s not) ### Patches The vulnerability has been fixed in commit c7ea001 (and further improved in cbaccf3), which is included in version [0.4.0](https://rubygems.org/gems/asciidoctor-include-ext/versions/0.4.0). ### Workarounds ```rb require 'asciidoctor/include_ext' class Asciidoctor::IncludeExt::IncludeProcessor # Overrides superclass private method to mitigate Command Injection # vulnerability in asciidoctor-include-ext <0.4.0. def target_uri?(target) target.downcase.start_with?('http://', 'https://') \ && URI.parse(target).is_a?(URI::HTTP) rescue URI::InvalidURIError false end end ``` ### References * https://sakurity.com/blog/2015/02/28/openuri.html ### Credits This vulnerability was discovered by Joern Schneeweisz from the GitLab Security Research Team. ### For more information See commit message c7ea001. If you have any questions or comments about this advisory open an issue in [jirutka/asciidoctor-include-ext](https://github.com/jirutka/asciidoctor-include-ext/issues/).

Advisory Timeline

  • First published March 31, 2022 (1656 days ago).
  • Last revised November 8, 2023 — 586 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update asciidoctor-include-ext to 0.4.0 or later
gem install asciidoctor-include-ext -v 0.4.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
asciidoctor-include-ext
rubygems
0.1.0, 0.1.1, 0.2.0, 0.3.0 (+1 more)0.4.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-78
    OS Command InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2022-24803?
Command Injection vulnerability in asciidoctor-include-ext This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2022-24803?
CVE-2022-24803 affects asciidoctor-include-ext. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-24803 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-v222-6mr4-qj29

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies