CVE-2026-65636

YAML injection via unescaped newlines in ymlr document comments

Published Jul 31, 2026 CVSS 4.0 · 2.1 Low EPSS < 1% KEV · Not listed
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.

An attacker who controls text that the host application passes as a comment can forge top-level mapping keys, override values the application itself set, and emit --- or ... markers that split the output into additional documents. Downstream consumers of the generated YAML, such as configuration loaders, deployment manifests, CI pipelines and data importers, parse the injected content as legitimate data. The same clause backs Ymlr.document/2, Ymlr.documents!/2 and Ymlr.documents/2, so every document encoding entry point is affected.

This vulnerability is associated with program files lib/ymlr.ex and program routines 'Elixir.Ymlr':document!/2, 'Elixir.Ymlr':documents!/2.

This issue affects ymlr from 0.0.1 before 5.1.6.

Analysis

AI-generated

Technical impact

An attacker who controls the text supplied as a comment can inject arbitrary YAML content. Because unescaped carriage return or line feed characters terminate the comment, the injected data is emitted at column zero and parsed as part of the document body. This allows forging of top‑level mapping keys, overriding of application‑supplied values, and the injection of---or ... document separators to create multiple YAML documents. The vulnerability originates from an improper neutralization of CRLF sequences and is classified as CWE‑93. The impact is a potential compromise of integrity and availability of any downstream consumer that interprets the generated YAML, such as configuration loaders, deployment manifests, CI pipelines, and data importers.

Affected Systems

The affected software is ufirstgroup ymlr. Versions from 0.0.1 up to but not including 5.1.6 are vulnerable. Any application using an affected version of this library is at risk.

Risk and Exploitability

The CVSS score for this vulnerability is 2.1, and the EPSS score is less than 1 %, indicating a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. Exploitation requires an attacker to supply untrusted text that is passed into a comment field by the application. If the application is exposed to attacker‑controlled input, the attacker can inject arbitrary YAML and potentially alter configuration or introduce malicious documents. The overall risk is low, but the deception of injecting new documents or overriding critical values can have significant downstream consequences.

Remediation

Vendor Workaround

Split any untrusted comment string on line breaks and pass the resulting list as the comment element of the {comment, data} tuple. Ymlr prefixes every list element with its own # marker, so no line can leave the comment context. Alternatively, reject comment strings that contain carriage return or line feed characters, or keep untrusted text out of comments entirely and place it in the encoded data instead, where the encoder quotes it.


OpenCVE Recommended Actions

  • Upgrade ufirstgroup ymlr to version 5.1.6 or later
  • Split any untrusted comment string on line breaks and pass the resulting list to the comment element of the {comment, data} tuple, so each line is prefixed with its own # marker
  • Alternatively, reject comment strings that contain carriage return or line feed characters, or keep untrusted text out of comments entirely and place it in the encoded data, ensuring the encoder quotes it

Generated by OpenCVE AI on August 3, 2026 at 09:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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. An attacker who controls text that the host application passes as a comment can forge top-level mapping keys, override values the application itself set, and emit --- or ... markers that split the output into additional documents. Downstream consumers of the generated YAML, such as configuration loaders, deployment manifests, CI pipelines and data importers, parse the injected content as legitimate data. The same clause backs Ymlr.document/2, Ymlr.documents!/2 and Ymlr.documents/2, so every document encoding entry point is affected. This vulnerability is associated with program files lib/ymlr.ex and program routines 'Elixir.Ymlr':document!/2, 'Elixir.Ymlr':documents!/2. This issue affects ymlr from 0.0.1 before 5.1.6.
Title YAML injection via unescaped newlines in ymlr document comments
First Time appeared Ufirstgroup
Ufirstgroup ymlr
Weaknesses CWE-93
CPEs cpe:2.3:a:ufirstgroup:ymlr:*:*:*:*:*:*:*:*
Vendors & Products Ufirstgroup
Ufirstgroup ymlr
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N'}

Weaknesses
  • CWE-93

    Improper Neutralization of CRLF Sequences ('CRLF Injection')

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Aug 1, 2026, 4:18 AM
Reserved
Jul 22, 2026, 1:58 PM
Status
Awaiting Analysis
Published
Jul 31, 2026, 2:16 PM
Modified
Oct 23, 2026, 11:10 PM