YAML injection via unescaped newlines in ymlr document comments
ufirstgroup ymlr
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ufirstgroup ymlr |
| No fix yet |
| ufirstgroup ymlr |
| No fix yet |
Original description
Improper Neutralization of CRLF Sequences vulnerability in ufirstgroup ymlr (Elixir.Ymlr module) allows attackers to inject arbitrary content into generated YAML documents through document comments. Ymlr.document!/2 interpolates each caller-supplied comment string into the output behind a single # prefix without validating it or escaping line breaks. Because a YAML comment is terminated by a line break, the first carriage return or line feed in the comment string ends the comment context and everything after it is emitted at column 0 of the document body.