10.0critical
Command Injection vulnerability in asciidoctor-include-ext
- Severity
- 10.0critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.69% (higher than 86% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-v222-6mr4-qj29
Description
Asciidoctor-include-ext is Asciidoctor’s standard include processor reimplemented as an extension. Versions prior to 0.4.0, when used to 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! The problem has been patched in the referenced commits.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| jirutka asciidoctor-include-ext | < 0.4.0 | CVE List |
| asciidoctor-include-ext (RubyGems) | before 0.4.0 | GitHub Advisory Database |
| asciidoctor-include-ext_project asciidoctor-include-ext | before 0.4.0 | NVD |
All scores
| GitHub_M | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 10.0high CVSS:2.0 | AV:N/AC:L/Au:N/C:C/I:C/A:C |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
Asciidoctor-include-ext is Asciidoctor’s standard include processor reimplemented as an extension. Versions prior to 0.4.0, when used to 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! The problem has been patched in the referenced commits.
GitHub Advisory Database
Impact
Applications using Asciidoctor (Ruby) with 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 (EDIT: it’s not)allow-uri-read is disabled!
Patches
The vulnerability has been fixed in commit c7ea001 (and further improved in cbaccf3), which is included in version 0.4.0.
Workarounds
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
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.
NVD (es)
Asciidoctor-include-ext es el procesador de inclusión estándar de Asciidoctor reimplementado como una extensión. En versiones anteriores a 0.4.0, cuando son usadas para renderizar la entrada suministrada por el usuario en el marcado AsciiDoc, pueden permitir a un atacante ejecutar comandos arbitrarios del sistema en el sistema operativo anfitrión. Este ataque es posible incluso cuando "allow-uri-read" está deshabilitado. El problema ha sido parcheado en los commits referenciados
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24803 changed 2025-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v222-6mr4-qj29 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-24803 changed 2026-06-17 | Public domain |