CVE-2018-20857: samlr XML nodes comment attack
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.46742%
CWE
Published
7/31/2019
Updated
8/17/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
samlr | rubygems | < 2.6.2 | 2.6.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper XML comment handling in SAML response parsing. The NameID value extraction in Samlr likely used XML parsing that concatenated text nodes without properly ignoring comment nodes. This allowed attackers to craft values like 'user@example.com<!---->.attacker.com' where the parser would incorrectly interpret the full string as the NameID. The fix in v2.6.2 would have modified this NameID extraction logic to strip comments or use XML parsing methods that respect node boundaries.