GHSL-2020-147: Cross-Site Request Forgery (CSRF) in Sustainsys/Saml2
The Saml2 library lacks a fix for a known CSRF vulnerability, allowing an attacker to trick a logged-in user with 2FA enabled into regenerating their recovery codes, which invalidates the old ones. This could permanently lock the user out of their account if they lose their 2FA device.
Saml2 is vulnerable to a Cross-Site Request Forgery (CSRF) that may lead per-user denial of service (DoS).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
This issue may lead to a per-user denial of service, as the user could be locked out of their account if they lose access to their 2FA device.
What the attacker needed
Victim is logged in; victim has 2FA enabled; victim clicks a link or visits a malicious site
The fix
The issue was resolved according to the timeline.
How it was found
- A logged-in user with 2FA enabled is tricked into clicking a link or visiting a malicious site.
- The link or site makes a request to the recovery code generation endpoint without the user's consent.
- The user's recovery codes are regenerated, invalidating the previous ones.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Cross-Site Request Forgery (CSRF) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, an attacker could trick a user into visiting a special link that causes the site to generate new recovery codes, making the old ones useless. If the user then loses their phone (the second factor), they cannot log in because the old recovery codes no longer work.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.