-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reported by Joern Schneeweisz from GitLab GmbH: > During an internal assessment on some GitLab code I came across a way > to execute arbitrary commands in your asciidoctor-include-ext Gem. > > The following adoc snippet demonstrates the issue: > > ``` > :app-name: |id # + \ > http://test.com > > include::{app-name}[] > ``` > > It uses a linebreak to bypass the `target_uri` check here > https://github.com/jirutka/asciidoctor-include-ext/blob/master/lib/asciidoctor/include_ext/include_processor.rb#L97 > and feed a command with the `|` prefix to open/IO.foreach. > > You can verify this with the above snippet by rendering it like this > > ``` > asciidoctor -r asciidoctor-include-ext -a allow-uri-read home.asciidoc > ``` See-Also: https://sakurity.com/blog/2015/02/28/openuri.html
- Loading branch information
Showing
2 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters