lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Oct 2014 20:00:27 -0400
From: Scott Arciszewski <>
Subject: [FD] Go Home WP-API, You're Drunk...

... or more accurately, asleep at the wheel!                                  
 _________/ STORY TIME (feel free to skip this if you don't care) \__________ 
|                                                                            |
| Recently, I made a quick analysis of all of the public projects listed     |
| on HackerOne.    |
|                                                                            |
| If you scroll to the bottom, I listed several projects in the "sweet       |
| spot": open source AND a minimum bounty. Outside of the Internet Bug       |
| Bounty project, there are only two projects listed: WP-API and Ian Dunn (a |
| WordPress developer who has many projects).                                |
|                                                                            |
| In the past three weeks, I have opened a handful of bug reports for other  |
| projects using the HackerOne platform, and they all responded immediately. |
|, for example, had a fix ready within a day of being notified.     |
| Concrete5 asked me to send a pull request to fix the issue I raised. Both  |
| projects, in my opinion, deserve further scrutiny and assistance. Srsly.   |
|                                                                            |
| WP-API, however, still has yet to even acknowledge the bug report sitting  |
| in the issue tracker for 17 days (and counting). Even when pressed for a   |
| simple "We got your report, here's an estimate on when we can get to it,"  |
| I was met with complete radio silence. I sent one last update to my bug    |
| reports asking to respond before 8 PM or I will post on Full Disclosure    |
| everything I have found (which, while not exactly the most impressive bugs |
| anyone will see on this list this month, are at least deserving of some    |
| sort of response).                                                         |
|                                                                            |
| So here we are.                                                            |
I. WP-API/Key-Auth                                                            
This is pretty much a textbook example of "How Not to Implement Signature      
Verification." Let's count the things wrong with it!                           
  1. json_encode() can return FALSE and there is no error checking employed (I
     am pretty sure an attacker can trigger this condition easily).           
  2. md5($arbitrary . $secret) is almost the ideal situation for length-      
     extension attacks.                                                       
     hash_hmac('sha256', $arbitrary, $secret) would be considerably safer.    
  3. Signature not compared in constant time (while timing attacks are not the
     most trivial attack to perform, and are noisy as all hell, it's still    
     problematic for authentication code to not provide this protection).     
  4. Signatures are compared with a non-strict != operator.                   
II. WP-API/OAuth1                                                             
Same as point 3 from Key-Auth with regard to timing attacks. However, this is 
not an isolated incident. Many OAuth1 and OAuth2 libraries have the exact same
problem. In fact, feel free to reuse a solution I submitted to one of these   
projects to patch it.                                                         
If I were a betting man, I would wager that most OAuth server implementations 
fail to take the necessary precautions when handling cryptographic signatures.
Which is sort of funny when you think about the fact that that's their entire 
reason for existing.                                                          
Point being: I don't blame WP-API for this one, considering how many OAuth1/2 
server implementations I've seen with similar weaknesses, and also considering
that there aren't many (any?) botnets spawned from timing attacks. Yet.       
If the WP-API team would like to still honor their bounty, I encourage them   
to instead donate it to the PayPal 14, whom are being sentenced tomorrow.     
That's all from me. Hopefully someone can kick the right person in the ass to 
prompt the maintainers into action to actually respond to reports on HackerOne
for a change.                                                                 

Download attachment "signature.asc" of type "application/pgp-signature" (835 bytes)

Sent through the Full Disclosure mailing list
Web Archives & RSS:

Powered by blists - more mailing lists