Tried, Tested and Proven

Security Advisory 07-013 – Remote Code Execution In GreenSQL Logging Facility

Vulnerability Title:

Remote Code Execution In GreenSQL Logging Facility.

Vulnerable System:


Vulnerability discovery and development:

Portcullis Security Testing Services

Credit for Discovery:

Nico Leidecker of Portcullis Computer Security Ltd discovered this vulnerability. Further research was then carried out and the vendor notified.

Affected Systems:

Version 0.6.3 was tested and found to be vulnerable.


GreenSQL is an Open Source database Firewall which acts as proxy server and is used to protect databases from SQL injection attacks. Any incoming request is written to a log file using the ‘fprintf’ function in the printline function of the logging facility. There is no explicit format string supplied.


By sending a specially crafted request to the proxy server, an attacker could exploit the vulnerability and execute code in the server’s context.

Vendor Status:

The vendor has been contacted and has advised that the downloadable fixed version is available at


Copyright © Portcullis Computer Security Limited 2007, All rights reserved worldwide.
Permission is hereby granted for the electronic redistribution of this information. It is not to be edited or altered in any way without the express written consent of Portcullis Computer Security Limited.


The information herein contained may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user’s risk. In no event shall the author/distributor (Portcullis Computer Security Limited) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.