Penetration Testing

We are an independent information security consultancy, specialising in network and web application penetration testing.

Get in touch >

ScriptFu Buffer Overflow in GIMP


There is a buffer overflow in the script-fu server component of GIMP (the GNU Image Manipulation Program) in all 2.6 versions (Windows and Linux versions) affecting both the script-fu console and the script-fu network server. A crafted msg to the script-fu server overflows a buffer and overwrites several function pointers allowing the attacker to gain control of EIP and potentially execute arbitrary code. This issue is fixed in the latest, stable GIMP version (currently 2.8.0).

  • CVE number: CVE-2012-2763
  • Vendor homepage:
  • Vendor notified: 18/05/2012
  • Found by Joseph Sheridan, Director of Reaction Information Security

PoC file is available here: /advisories/scriptfubof.c

About ReactionIS

Reaction Information Security is a leading independent pen test consultancy specialising in delivering the highest quality services including network pen testing and web application security testing. As a CESG CHECK Service Provider we are authorised to carry out penetration testing on classified government networks.

Affected Products

GIMP <= 2.6.12 (Windows or Linux builds)


There is a buffer overflow in the command parsing code such that a long command overwrites various function pointers on the heap and gives the attacker full control of EIP. The following command sent to the script-fu server will trigger the vulnerability:

(file-bmp-load 123 aaaaaaaaaaaaa...a*1000...aaaaaaaaaa raw-filename)


Successful exploitation of the vulnerability may result in remote code execution.


Upgrade to the latest stable version of GIMP (currently 2.8 branch) - the 2.6 branch is no longer supported by the GIMP development team.


A workaround would be not to use this feature on a vulnerable version of GIMP. The GIMP development team have strongly suggested only using the script-fu network server in a secure/sandboxed environment due to security concerns.


In addition to posting on the website, a text version of this notice has been posted to the following e-mail and Usenet news recipients.

  • bugtraq () securityfocus com
  • full-disclosure () lists grok org uk

Future updates of this advisory, if any, will be placed on the ReactionIS corporate website, but may or may not be actively announced on mailing lists or newsgroups. Users concerned about this problem are encouraged to check the current page for any updates.

CLAS Consultant Services