Skip to content

Commit

Permalink
Merge pull request auth0#79 from ziluvatar/fix-signature-location
Browse files Browse the repository at this point in the history
sec: fix signature location lookup
  • Loading branch information
glena authored Mar 13, 2018
2 parents 6d50336 + dca554e commit f75211d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 6 deletions.
24 changes: 24 additions & 0 deletions SECURITY-NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Security vulnerability details for passport-wsfed-saml2 < 3.0.10
===============================================================

A vulnerability was found in the validation of a SAML signature. The validation doesn't ensure that the "Signature" tag is at the proper location inside an "Assertion" tag. This leads to a signature relocation attack where the attacker can corrupt one field of data while
maintaining the signature valid. This could allow an authenticated attacker to "remove" one group from his assertion or corrupt another field of an assertion.

Updated packages are available on npm. To ensure delivery of additional bug fixes moving forward, please make sure your `package.json` file is updated to take patch and minor level updates of our libraries. See below:

```
{
"dependencies": {
"passport-wsfed-saml2": "^3.0.10"
}
}
```

## Upgrade Notes

This fix patches the library that your application runs, but will not impact your users, their current state, or any existing sessions.

You can read more details regarding the vulnerability [here](https://auth0.com/docs/security/bulletins/cve-2018-8085).



Security vulnerability details for passport-wsfed-saml2 < 3.0.5
===============================================================

Expand Down
2 changes: 1 addition & 1 deletion lib/passport-wsfed-saml2/saml.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ SAML.prototype.validateSamlAssertion = function (samlAssertion, callback) {
self.validateSignature(samlAssertion.toString(), {
cert: self.options.cert,
thumbprints: self.options.thumbprints,
signaturePath: ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']" }, function(err) {
signaturePath: "/*[local-name(.)='Assertion']/*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']" }, function(err) {
if (err) return callback(err);

self.parseAssertion(samlAssertion, callback);
Expand Down
29 changes: 26 additions & 3 deletions test/interop.tests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/saml20.tests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f75211d

Please sign in to comment.