GHSA-36p7-xjw8-h6f2 CVE-2016-5697
Ruby-saml allows attackers to perform XML signature wrapping attacks
- Severity
- 7.5 / 10
- High · CVSS 3.0
- Exploit chance (EPSS)
- 1.21%
- Chance of exploitation in the next 30 days. Higher than 68.39% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-91 XML Injection (aka Blind XPath Injection)
- Fix
1.3.0- Upgrade ruby-saml to this version or later
Description
ruby-saml prior to version 1.3.0 is vulnerable to an XML signature wrapping attack in the specific scenario where there was a signature that referenced at the same time 2 elements (but past the scheme validator process since 1 of the element was inside the encrypted assertion). ruby-saml users must update to 1.3.0, which implements 3 extra validations to mitigate this kind of attack.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| ruby-saml | < 1.3.0 |
1.3.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
ruby-saml RubyGems → 1.3.0
- bundler
bundle update ruby-saml # Gemfile: gem "ruby-saml", ">= 1.3.0"
Severity breakdown
CVSS 3.0 7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Weakness
CWE-91: XML Injection (aka Blind XPath Injection)
The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.
How to prevent it
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
References
Advisories
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-x4h9-gwv3-r4m4 Ruby-saml allows a Libxml2 Canonicalization error to bypass Digest/Signature validation | Critical | Also affects ruby-saml |
| GHSA-9v8j-x534-2fx3 Ruby-saml has a SAML authentication bypass due to namespace handling (parser differential) | Critical | Also affects ruby-saml |
| GHSA-rrqh-93c8-j966 Ruby SAML DOS vulnerability with large SAML response | Medium | Also affects ruby-saml |
| GHSA-754f-8gm6-c4r2 Ruby SAML allows a SAML authentication bypass due to namespace handling (parser differential) | Critical | Also affects ruby-saml |
| GHSA-4vc4-m8qh-g8jm Ruby SAML allows a SAML authentication bypass due to DOCTYPE handling (parser differential) | Critical | Also affects ruby-saml |
| GHSA-92rq-c8cf-prrq Ruby SAML allows remote Denial of Service (DoS) with compressed SAML responses | High | Also affects ruby-saml |
| GHSA-jw9c-mfg7-9rx2 SAML authentication bypass via Incorrect XPath selector | Critical | Also affects ruby-saml |
| GHSA-r364-2pj4-pf7f ruby-saml vulnerable to XPath injection | Critical | Also affects ruby-saml |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor