News for hackers. Stuff that matters.

Tell HN : Wordpress.com exploit

There seems to be a very serious wordpress.com exploit which allows 3rd party sites/domains to gather a hash code which can be used to login to an user's account. Here is how to reproduce,

1. Login to wordpress.com

2. Take a look at this page : http://www.sandaru1.com/wordpress_test.html (This page is just showing the hashcode/url, I'm not saving any hashcodes)

3. Open another browser (in an attacker's case, his/her browser) and paste the URL shown in the page

4. Goto wordpress.com on the new browser and you are logged in

The exploit itself seems to be too simple. Am I missing something here or is this a serious bug?

P.S - I emailed both Automattic support and Matt Mullenweg. I didn't get any response back.

( 57 comments | 110 points | on HN )
Re:Tell HN : Wordpress.com exploit by lloydbudd on Friday March 19, 2010 @12:32PM (#1204489)
WordPress.com team is investigating the issue. They have disabled the vector while they continue to investigate.
Re:Tell HN : Wordpress.com exploit by stanleydrew on Friday March 19, 2010 @12:38PM (#1204506)
Do you work on the Wordpress.com team? No info in your profile.
Re:Tell HN : Wordpress.com exploit by lloydbudd on Friday March 19, 2010 @12:43PM (#1204519)
Yes. Updated my profile, but don't believe what you read on the interwebs ;-)
Re:Tell HN : Wordpress.com exploit by anotherjesse on Friday March 19, 2010 @02:26PM (#1204853)
Ha! Funny as always.

Too bad there is no way of verifying you are really lloyd.

Seems like we could come up with something - even if it only works for techies.

Re:Tell HN : Wordpress.com exploit by savant on Friday March 19, 2010 @03:45PM (#1205069)
You mean like foaf+ssl?
Re:Tell HN : Wordpress.com exploit by gorm on Friday March 19, 2010 @01:39PM (#1204686)
Is it a general bug in WordPress MU or just an issue with wordpress.com?
Re:Tell HN : Wordpress.com exploit by lloydbudd on Friday March 19, 2010 @02:22PM (#1204839)
Specific to WordPress.com.

Not a general bug in WordPress or WordPress MU.

Re:Tell HN : Wordpress.com exploit by bittersweet on Friday March 19, 2010 @12:07PM (#1204426)
How did you contact them by the way? I've been looking for ways to get in touch with them with a security related question but can't find anything, which doesn't look well on their part, especially with their security record.
Re:Tell HN : Wordpress.com exploit by lloydbudd on Friday March 19, 2010 @12:31PM (#1204485)
Does seem a little tricky to find.

security at wordpress.org Listed at http://core.trac.wordpress.org/

Members of WordPress.com are on that mailing list as well.

http://en.support.wordpress.com/contact/ if anything is definitely WordPress.com specific, but I suggest always including security at wordpress org, because there may be another permutation to the attack.

Re:Tell HN : Wordpress.com exploit by sandaru1 on Friday March 19, 2010 @12:33PM (#1204495)
Indeed, they don't have a method for reporting security exploits. Wordpress Blogging Platform has one, but this issue is only limited to wordpress.com. I believe it has something to do with intensedebate.com

First I sent a email to matt(http://ma.tt/contact/). Then, I used the Automattic contact form(http://automattic.com/contact/)

Re:Tell HN : Wordpress.com exploit by elptacek on Friday March 19, 2010 @03:39PM (#1205052)
I experienced something similar a while back when I tarred up a live instance of a wordpress installation and fired it up on my local machine. To deal with redirects, I changed /etc/hosts to resolve the live domain to the local IP. While I was working on the local copy, I would from time to time need to refer to the live instance. To do this, I'd comment out the entry in /etc/hosts and browse to the live site. At some point, I noticed that the theme for the live site had been set back to the default. When I investigated, it turned out that my session credentials for the local instance were honored by the live (remote) site.

The odd thing about this is that I hadn't been given the admin password for the remote-live wordpress instance. I had manually modified the database to change the admin password in order to work on the local instance before firing it up.

I never did look into how wordpress created or verified session credentials, but it did seem like something odd was going on, there.

Re:Tell HN : Wordpress.com exploit by ronnier on Friday March 19, 2010 @11:37AM (#1204347)
I haven't tested this, but if it truly works, one just needs to include <script src="http://wordpress.com/remote-login.php?action=jsonp&jsonp...; in a page and harvest hashes of its visitors?
Re:Tell HN : Wordpress.com exploit by sandaru1 on Friday March 19, 2010 @11:40AM (#1204351)
Yes. Just a simple JSONP API call.
Re:Tell HN : Wordpress.com exploit by stanleydrew on Friday March 19, 2010 @11:54AM (#1204388)
Is there wordpress JSONP API documentation anywhere? A couple of Google searches didn't turn anything up.
Re:Tell HN : Wordpress.com exploit by bittersweet on Friday March 19, 2010 @11:59AM (#1204403)
I checked out the Wordpress source just now and no mention of remote-login. I don't know if wordpress.com itself has any API documentation.
Re:Tell HN : Wordpress.com exploit by ErrantX on Friday March 19, 2010 @12:03PM (#1204409)
It looks like they have an xmlrpc.php file - so you could try using that.
Re:Tell HN : Wordpress.com exploit by jcsalterego on Friday March 19, 2010 @11:52AM (#1204384)
Just curious, how long did you wait for a response before doing the whole full disclosure thing? :-\
Re:Tell HN : Wordpress.com exploit by sandaru1 on Friday March 19, 2010 @11:59AM (#1204402)
About 2/3 days
Re:Tell HN : Wordpress.com exploit by growt on Friday March 19, 2010 @01:08PM (#1204583)
like in 2 or 3 days, or like 0.666 days? :)
Re:Tell HN : Wordpress.com exploit by sandaru1 on Friday March 19, 2010 @01:45PM (#1204726)
2 or 3 days
Re:Tell HN : Wordpress.com exploit by vinhboy on Friday March 19, 2010 @02:02PM (#1204787)
Couple of weeks ago I found a WP related hack on MT, had the same dilemma. I still wonder what the proper protocol is.
Re:Tell HN : Wordpress.com exploit by hew on Friday March 19, 2010 @02:29PM (#1204861)
For core issues (WordPress.org), send an email with the details to:

[email protected]

For WordPress.com specific issues, you can use the general support form:

http://en.support.wordpress.com/contact/

Re:Tell HN : Wordpress.com exploit by tptacek on Friday March 19, 2010 @02:42PM (#1204897)
General support form for inbound security findings? Check!

Word "security" appears nowhere on the front page? Check!

Word "security" appears nowhere on the support page? Check!

Guys. Please. Fix this! It's not like it's unlikely that someone is going to want to report things to you.

You need:

* A security page...

* ... with a PGP key ...

* ... and an email contact ...

* ... of someone who will write back immediately ...

* ... who knows what a security vulnerability is.

That's all you need to do. You haven't done that yet. You come close on Wordpress.org, but not close enough. You are asking people to wait only 2-3 days before writing scary-sounding blog posts. This is too easy not to fix.

While you're at it, earn some extra credit:

* Reply with special vulnerability IDs so that reporters think their report isn't waiting in line after bugs in your online help system. Whether it actually or isn't isn't even a problem you need to solve yet.

* Thank researchers privately instead of ignoring them.

* Give them a phone number to call back and get status on their report. You're a company. You can scale this.

* Be like Google, Apple, and Microsoft and keep a thank-you page for people who have disclosed problems "responsibly" to you.

Re:Tell HN : Wordpress.com exploit by tshtf on Friday March 19, 2010 @02:57PM (#1204939)
Some more useful advice for Open Source projects and security/release management can be found in "Producing Open Source Software" from http://producingoss.com/en/publicity.html
Re:Tell HN : Wordpress.com exploit by lloydbudd on Friday March 19, 2010 @05:28PM (#1205335)
Awesome comments and advice. My co-workers are working on this.
Re:Tell HN : Wordpress.com exploit by oscardelben on Friday March 19, 2010 @12:34PM (#1204498)
Situations like this are why I've chosen to stay away from wordpress.
Re:Tell HN : Wordpress.com exploit by jqueryin on Friday March 19, 2010 @01:43PM (#1204715)
If this was your personal site or a custom CMS, odds are there wouldn't be enough community support to report bugs (or exploits) like this one. You'd simply go about your business thinking your site was secure.
Re:Tell HN : Wordpress.com exploit by tptacek on Friday March 19, 2010 @02:38PM (#1204886)
Wordpress is many good things. Secure is not one of them. It has a genuinely weak design.
Re:Tell HN : Wordpress.com exploit by idlewords on Friday March 19, 2010 @07:56PM (#1205613)
If it was my personal site, I would serve flat files. The fundamental problem with Wordpress is a design decision to have live code serving what could easily be static content. If there is no code, there's no exploit.
Re:Tell HN : Wordpress.com exploit by oscardelben on Friday March 19, 2010 @03:57PM (#1205102)
Personally, the reason is that there are often many security issues related with wordpress. I know that no software is perfect, but if I write the software I can be responsible for it, while if I rely on other people software I'm still responsible but for something I don't truly understand. I think wordpress is a fantastic blogging platform, but from a security perspective it's not.
Re:Tell HN : Wordpress.com exploit by wildmXranat on Friday March 19, 2010 @01:46PM (#1204729)
I know he didn't state which direction he chose, but assuming that he's incompetent is pretty bad on your part.

I remember few months ago, wordpress had a bug where an attacker could keep on resetting administrators account password. He might actually have a point

Re:Tell HN : Wordpress.com exploit by jqueryin on Friday March 19, 2010 @02:11PM (#1204810)
Incompetence has nothing to do with it. It's just all too common that we overlook something in our code. All software inherently has bugs as no developer is perfect. There's alot to be said about having millions of prying eyes nitpicking your source code. I'd much assume millions of people critiqued my code as opposed to none at all.
Re:Tell HN : Wordpress.com exploit by shrughes on Friday March 19, 2010 @02:30PM (#1204863)
Have you looked at the code? When I started using WordPress on my personal site, people warned me not to look behind the curtains. It seems pretty notorious for being a mess.
Re:Tell HN : Wordpress.com exploit by erlanger on Friday March 19, 2010 @02:09PM (#1204804)
Some software needs more of this sort of assistance than others.
Re:Tell HN : Wordpress.com exploit by jseliger on Friday March 19, 2010 @02:38PM (#1204887)
... So what do you use for blogging software, if you use anything?
Re:Tell HN : Wordpress.com exploit by tptacek on Friday March 19, 2010 @02:48PM (#1204921)
You didn't ask me, but may I suggest git and a static site generator? That's what we're doing, and we're thrilled with it.
Re:Tell HN : Wordpress.com exploit by jrockway on Friday March 19, 2010 @05:12PM (#1205299)
Definitely a good idea. Blogs are inherently non-dynamic, except for the once-in-a-while article posting, for which you can have a tiny piece of public-facing software dedicated to that one small task (if you even want that). Or your software can just rsync the new version of your blog to the live server.

I've written off commenting on blogs... so while that was the reason why I made Angerwhale dynamic, I will never be tempted to make that mistake again. Blogs are static pages with an index, per-tag indexes, and a few XML feeds. No database queries should be made to show someone a blog post.

Re:Tell HN : Wordpress.com exploit by eneveu on Wednesday March 24, 2010 @03:33AM (#1215195)
I want to start blogging, and I'm considering Jekyll + Disqus. Many people seem to use this combo to add comments to a static website. You may get the "best of both worlds": static website + dynamic comments.

There is a discussion on Jekyll (and Disqus) here: http://news.ycombinator.com/item?id=998411

Re:Tell HN : Wordpress.com exploit by simonista on Friday March 19, 2010 @04:36PM (#1205202)
Which static site generators did you evaluate, and which did you end up choosing?
Re:Tell HN : Wordpress.com exploit by tptacek on Friday March 19, 2010 @04:53PM (#1205249)
Jekyll and nanoc3. We went with nanoc3, which was the first one we were able to get working right. I have very few preferences other than "want Ruby" and "must actually work".
Re:Tell HN : Wordpress.com exploit by oscardelben on Friday March 19, 2010 @04:01PM (#1205106)
For one website I use rails. I made the platform in 2 days with full cache caching (http://www.freestylemind.com). For my technical blog (http://oscardelben.com) I now use nesta, but I was previously using jekyll. For my needs they works very well.
Re:Tell HN : Wordpress.com exploit by davidu on Friday March 19, 2010 @12:11PM (#1204435)
I sent this News.YC page over to Barry over at Wordpress who runs ops.

FWIW, I tested this and it does seem to work.

Re:Tell HN : Wordpress.com exploit by ErrantX on Friday March 19, 2010 @11:45AM (#1204366)
ok, I got a friend to copy/paste my url into their browser over IM (currently in the wrong office to access different IP's) and it didn't work (I am assuming they did it right, etc.).

So this looks like it could be a local exploit only (doesn't make it any less exploitable)

Re:Tell HN : Wordpress.com exploit by teye on Friday March 19, 2010 @12:02PM (#1204407)
I get "Invalid key." locally.
Re:Tell HN : Wordpress.com exploit by ErrantX on Friday March 19, 2010 @12:04PM (#1204414)
I get that if you try the same hash twice. Go to wordpress.com and see if it logged you in.
Re:Tell HN : Wordpress.com exploit by stanleydrew on Friday March 19, 2010 @12:35PM (#1204500)
Based on a comment below it seems this doesn't affect local installs of Wordpress since the source doesn't include remote-login.php.
Re:Tell HN : Wordpress.com exploit by chanux on Friday March 19, 2010 @12:16PM (#1204448)
OK Here's what I experienced.

First I loged in WP, got the URL from sandaru1s page. I logged out and tried the URL. And yes it worked. Then I deleted all wordpress cookies and tried again. Then I got the response as invalid key.

Again logged in and fetched new URL. This time I got a 502 with the URL. Refreshing took me 'invalid key' message (didn't touch cookies).

Update: Sandaru1s page doesn't provide a url anymore (for me). May be it's fixed?

Update2: Going to Sandaru1s page once logged in to WP now logs me out.

Re:Tell HN : Wordpress.com exploit by phreanix on Friday March 19, 2010 @11:43AM (#1204359)
Shoot, works for me. WTF.

Edit:

Post this exploit here: http://en.forums.wordpress.com/forum/support

Of course, you'd have to be logged in first. =p

Re:Tell HN : Wordpress.com exploit by sev on Friday March 19, 2010 @12:14PM (#1204445)
I wouldn't post it there. I would contact them privately. We don't want any random stroller of the wordpress forums to get a hold of this.
Re:Tell HN : Wordpress.com exploit by vijaydev on Friday March 19, 2010 @12:24PM (#1204467)
but you would let a random stroller of hn get hold of this??
Re:Tell HN : Wordpress.com exploit by sev on Friday March 19, 2010 @03:42PM (#1205061)
That ship has already sailed. The more places it's posted, the worse it is.
Re:Tell HN : Wordpress.com exploit by SeamusBrady on Friday March 19, 2010 @12:43PM (#1204517)
Interesting that you consider HN a hangout for good guys only. A compliment!
Re:Tell HN : Wordpress.com exploit by sev on Friday March 19, 2010 @03:41PM (#1205055)
I never said I consider HN a hangout for good guys only. "Bad guys" are constantly looking for exploits in wordpress though, considering it's horrible track record. Therefore it's much more likely that one of them would go to the wordpress forums as opposed to here. Plus, it's already posted here, my point was to not make it any more public than it already has become.
Re:Tell HN : Wordpress.com exploit by jfarmer on Friday March 19, 2010 @11:24AM (#1204321)
Works for me. :|
Re:Tell HN : Wordpress.com exploit by ErrantX on Friday March 19, 2010 @11:36AM (#1204345)
yep, me too. ouch.

EDIT: is this tested on different IP addressess? I only have the one IP address in this office to try it on - I could see it being IP secured.

Re:Tell HN : Wordpress.com exploit by sandaru1 on Friday March 19, 2010 @11:46AM (#1204371)
I tested it using two different IP addresses about two days ago. Exploit is still there. Even if there are IP restrictions, it might be dangerous.
Re:Tell HN : Wordpress.com exploit by jorisvoorn on Friday March 19, 2010 @12:10PM (#1204433)
Is there any way, that it's fixed already? I've got the message "Invalid key." while I was trying to go to that URL in incognito/private mode OR in another browser