Net::OAuth versions before 0.33 for Perl check HMAC-SHA1, HMAC-SHA256 and PLAINTEXT signatures with a non-constant-time comparison in verify
Net::OAuth versions before 0.33 for Perl check HMAC-SHA1, HMAC-SHA256 and PLAINTEXT signatures with a non-constant-time comparison in verify. Each of the three compares the signature carried in the message against the locally computed one with the eq operator, which returns as soon as the two strings differ. The time taken to reject a signature varies with the length of the matching prefix. RSA-SHA1 is not affected, as it verifies through the RSA key object rather than by comparing strings. A client that can submit messages and time the replies may recover a valid signature one byte at a time rather than searching the whole signature space. Under PLAINTEXT the value compared against is the signature key itself, so the search recovers consumer_secret and token_secret.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.33
Fixed in 0.33
Mitigation
Upgrade to Net-OAuth 0.33 or later.
References
- Vendor advisory github.com/vurtdev/Net-OAuth/security/advisori…
- Patch github.com/vurtdev/Net-OAuth/commit/a1a16b58ad…
- Release notes metacpan.org/release/RRWO/Net-OAuth-0.33/changes
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.