# CVE-2026-65636: YAML injection via unescaped newlines in ymlr document comments

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.1
- **CVSS:** 2.1 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: Low; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: Low; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 5, 2026-11-26)
- **CWE:** CWE-93
- **Published:** 2026-07-31T13:29:31.198Z
- **Modified:** 2026-11-24T07:17:20.500Z

## Who should check

- Anyone running ufirstgroup ymlr \>= 0.0.1, \< 5.1.6
- Anyone running ufirstgroup ymlr \>= 0c11a86de83825e91c27cecaccb03f36416d8fe0, \< 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc

## Description

Improper Neutralization of CRLF Sequences vulnerability in ufirstgroup ymlr (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 Ymlr.document!/2, Ymlr.documents!/2.

This issue affects ymlr: from 0.0.1 before 5.1.6.

## Affected and fixed versions

- ufirstgroup ymlr: \>= 0.0.1, \< 5.1.6 (cvelist)
- ufirstgroup ymlr: \>= 0c11a86de83825e91c27cecaccb03f36416d8fe0, \< 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc (cvelist)

## Mitigation

- Upgrade ymlr to 5.1.6 or later.
- Upgrade ymlr to 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc or later.
- 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-65636. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-65636.md
Affected: ufirstgroup ymlr >= 0.0.1, < 5.1.6; ufirstgroup ymlr >= 0c11a86de83825e91c27cecaccb03f36416d8fe0, < 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc
Fixed in: ufirstgroup ymlr 5.1.6, ufirstgroup ymlr 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc

Steps:
1. Search this machine and project for ufirstgroup ymlr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-65636 being exploited?

There is no confirmed exploitation: CVE-2026-65636 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-65636?

Low: CVSS 2.1 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-65636?

ufirstgroup ymlr \>= 0.0.1, \< 5.1.6; ufirstgroup ymlr \>= 0c11a86de83825e91c27cecaccb03f36416d8fe0, \< 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc.

### Is there a fix for CVE-2026-65636?

Yes. Fixed in ufirstgroup ymlr 5.1.6, ufirstgroup ymlr 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc. Upgrade ymlr to 5.1.6 or later. Upgrade ymlr to 42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc or later. 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.

### How do I check if I'm affected by CVE-2026-65636?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/ufirstgroup/ymlr/security/advisories/GHSA-p8qx-7cp9-v6c9>
- patch: <https://github.com/ufirstgroup/ymlr/commit/7e53061fb2809b787fba0373c46b78e253c83adc>
- patch: <https://github.com/ufirstgroup/ymlr/commit/0c11a86de83825e91c27cecaccb03f36416d8fe0>
- patch: <https://github.com/ufirstgroup/ymlr/commit/42a0bf8b2af44b0e7c42d0b7044c8588ca5866dc>
- other: <https://cna.erlef.org/cves/CVE-2026-65636.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-65636>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-65636>

HTML: <https://flawdb.com/CVE-2026-65636> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-65636>
