{"id":"CVE-2022-24803","aliases":["CVE-2022-24803","GHSA-v222-6mr4-qj29"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection vulnerability in asciidoctor-include-ext","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nApplications 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)\n\n\n### Patches\n\nThe 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).\n\n### Workarounds\n\n```rb\nrequire 'asciidoctor/include_ext'\n\nclass Asciidoctor::IncludeExt::IncludeProcessor\n  # Overrides superclass private method to mitigate Command Injection\n  # vulnerability in asciidoctor-include-ext <0.4.0.\n  def target_uri?(target)\n    target.downcase.start_with?('http://', 'https://') \\\n      && URI.parse(target).is_a?(URI::HTTP)\n  rescue URI::InvalidURIError\n    false\n  end\nend\n```\n\n### References\n\n* https://sakurity.com/blog/2015/02/28/openuri.html\n\n### Credits\n\nThis vulnerability was discovered by Joern Schneeweisz from the GitLab Security Research Team.\n\n\n### For more information\n\nSee commit message c7ea001.\n\nIf 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/).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-03-31T23:27:15.000Z","modified":"2026-06-17T04:32:33.300Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","score":10,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 0.4.0","status":"affected"}],"vendor":"jirutka","product":"asciidoctor-include-ext","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.4.0"}],"ecosystem":"RubyGems","package":"asciidoctor-include-ext","purl":"pkg:gem/asciidoctor-include-ext","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.4.0"}],"vendor":"asciidoctor-include-ext_project","product":"asciidoctor-include-ext","cpe":"cpe:2.3:a:asciidoctor-include-ext_project:asciidoctor-include-ext:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/jirutka/asciidoctor-include-ext/security/advisories/GHSA-v222-6mr4-qj29","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jirutka/asciidoctor-include-ext/commit/c7ea001a597c7033575342c51483dab7b87ae155","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/jirutka/asciidoctor-include-ext/commit/cbaccf3de533cbca224bf61d0b74e4b84d41d8ee","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24803","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/jirutka/asciidoctor-include-ext","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/asciidoctor-include-ext/CVE-2022-24803.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2025-04-22T15:37:30.670Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24803","url":"https://www.cve.org/CVERecord?id=CVE-2022-24803","licence":"CVE Terms of Use","modified":"2025-04-22T18:17:46.997Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v222-6mr4-qj29","url":"https://github.com/advisories/GHSA-v222-6mr4-qj29","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:37.142Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24803","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24803","licence":"Public domain","modified":"2026-06-17T04:32:33.300Z"}],"updatedAt":"2026-11-25T22:58:10.358Z","epss":{"score":0.02686,"percentile":0.86261,"date":"2026-12-01T12:00:22.000Z"}}