Cryptographic Side Channel in OAuth Library
The OAuth library compares hashes and tokens with non-constant-time operators, which may make the checks susceptible to timing attacks.
Originally disclosed on HackerOne
- Triaged in 17 days
- Fixed in 17 days
- Paid in 17 days
- Disclosed after 17 days
Because hashes and tokens are compared with the !== and === operators, these checks may be susceptible to timing attacks. More info: http://codahale.com/a-lesson-in-timing-attacks/
Affected code:
https://github.com/WP-API/OAuth1/blob/45197eca2925f5022192903d3639decd0ae1811c/lib/class-wp-json-authentication-oauth1.php#L562 https://github.com/WP-API/OAuth1/blob/45197eca2925f5022192903d3639decd0ae1811c/lib/class-wp-json-authentication-oauth1.php#L290
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
The checks may be susceptible to timing attacks, though the text does not confirm a working exploit.
What the attacker needed
Ability to measure timing differences
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.
When a program checks if two strings are equal, it often stops at the first difference. This can leak information about how many characters match, because the check takes slightly longer for longer matches. An attacker can measure these tiny time differences to guess secret values like tokens or hashes.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.