Miggo Logo

CVE-2024-45409:
SAML authentication bypass via Incorrect XPath selector

10

CVSS Score
3.1

Basic Information

EPSS Score
0.94209%
Published
9/10/2024
Updated
9/16/2024
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
ruby-samlrubygems< 1.12.31.12.3
ruby-samlrubygems>= 1.13.0, < 1.17.01.17.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper XPath selectors in signature validation logic. The commit diff shows critical changes in xml_security.rb's validate_signature method:

  1. Changed XPath from '//ds:Reference' to './ds:Reference' to scope selection
  2. Added check for duplicate IDs (reference_nodes.length > 1)
  3. Modified CanonicalizationMethod/DigestMethod XPaths to use relative paths These changes directly address the signature bypass by preventing attackers from injecting malicious elements with duplicate IDs through absolute XPath traversal, which aligns with CWE-347 (signature verification flaw) described in the advisory.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Ru*y-S*ML in <= **.* *n* *.**.* <= *.**.* *o*s not prop*rly v*ri*y t** si*n*tur* o* t** S*ML R*spons*. *n un*ut**nti**t** *tt**k*r wit* ****ss to *ny si*n** s*ml *o*um*nt (*y t** I*P) **n t*us *or** * S*ML R*spons*/*ss*rtion wit* *r*itr*ry *ont*nts.

Reasoning

T** vuln*r**ility st*ms *rom improp*r XP*t* s*l**tors in si*n*tur* v*li**tion lo*i*. T** *ommit *i** s*ows *riti**l ***n**s in xml_s**urity.r*'s v*li**t*_si*n*tur* m*t*o*: *. ***n*** XP*t* *rom '//*s:R***r*n**' to './*s:R***r*n**' to s*op* s*l**tion