-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential security vulnerability #19
Comments
This should be addressed by #31. |
Thanks a lot. On Thursday, 29 May 2014 11:06 PM, Peter Loer [email protected] wrote: Closed #19. |
This is the fix i was mentioning--> https://github.com/pawanvshah/passport-saml/commit/8b7aa68571e34cbeb270021e862b62661ff3ebf9 . The details of the security issue in this link --> https://www.usenix.org/system/files/conference/usenixsecurity12/sec12-final91.pdf |
Looks like an important fix. Any chance you have a document that demonstrates the vulnerability? |
Hi, Here's the associated talk on this --> https://media.ccc.de/browse/congress/2012/29c3-5210-en-on_breaking_saml_h264.html The problem is with the way passport-saml extracts user identity info. So we had added a fix for this in the forked repo of passport saml library. On Friday, 30 May 2014 1:35 AM, Peter Loer [email protected] wrote: Looks like an important fix. |
Sorry, I didn't ask my question very well. Do you have a saml response XML document that is crafted in such a way that it exposes this vulnerability? If so, and if it is something you could share, I would like to use it as a test case. Thanks! |
Never mind, I was able to create a test case that demonstrates this. |
Cool. Here is the checkin. This was reviewed by our info security team and they were happy. On Friday, 30 May 2014 4:11 AM, Peter Loer [email protected] wrote: Never mind, I was able to create a test case that demonstrates this. |
@pawanvshah , I've checked in the following change that I believe should address this issue; I'd be interested in any feedback you might have: 9ce5992 It should be similar to your change in that it checks the ID of the object verified, but it also:
On the last point, I am not positive but I think your implementation might allow a document that looks something like the following:
|
Thanks a lot. Good to see the library becoming an active module again. |
Hi,
I tried to use passport-saml with okta as an identity provider.
I faced an issue with parsing the response from okta.
In the saml.js, there is this function called SAML.prototype.getElement.
This function gets the saml element from response.
In this the keys used to parse saml tags are 'saml' and 'samlp'.
Okta sends back 'saml2' and 'saml2p'.
So I had to add these keys in the code.
Here's how the method looks now.
Can you add it in the main library?
SAML.prototype.getElement = function (parentElement, elementName) {
if (parentElement['saml:' + elementName]) {
return parentElement['saml:' + elementName];
} else if (parentElement['samlp:'+elementName]) {
return parentElement['samlp:'+elementName];
} else if (parentElement['saml2p:'+elementName]) {
return parentElement['saml2p:'+elementName];
} else if (parentElement['saml2:'+elementName]) {
return parentElement['saml2:'+elementName];
}
return parentElement[elementName];
};
The text was updated successfully, but these errors were encountered: