Lucene search

K
rubygemsRubySecRUBY:ASCIIDOCTOR-INCLUDE-EXT-2022-24803
HistoryMar 30, 2022 - 9:00 p.m.

Command Injection vulnerability in asciidoctor-include-ext

2022-03-3021:00:00
RubySec
github.com
10
asciidoctor
ruby
asciidoctor-include-ext
command injection
vulnerability
patches
workarounds
asciidoc markup
system commands
security fix

CVSS2

10

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS3

10

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

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 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

Affected configurations

Vulners
Node
rubyasciidoctor-include-extRange0.4.0
VendorProductVersionCPE
rubyasciidoctor-include-ext*cpe:2.3:a:ruby:asciidoctor-include-ext:*:*:*:*:*:*:*:*

CVSS2

10

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS3

10

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

Related for RUBY:ASCIIDOCTOR-INCLUDE-EXT-2022-24803