search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Perl programs providing user-controlled I/O format strings may contain format string vulnerabilities

Vulnerability Note VU#946969

Original Release Date: 2005-12-06 | Last Revised: 2006-01-05


Programs written in Perl may contain many of the same types of format string vulnerabilities as programs written in C.


Perl is a programming language used in many applications and commonly used for web applications. It provides many of the same functions for formatted I/O as C, including sprintf() and printf(). As a result, programs written Perl may contain format string vulnerabilities similar to the types of format string vulnerabilities found in C programs.

Note: Although there has been increased interest in this issue recently, it has been known since at least 2002 that programs written in Perl may contain format string vulnerabilities.


Perl programs that pass user data to routines that subsequently use that data as a format string may be vulnerable. Such routines include, but are not limited to, printf(), sprintf(), and syslog().


Repair Perl Program

Programs written in Perl that contain format string vulnerabilities should be changed to not include user data in format strings.

Taint Mode

Perl provides a "taint" mode (-T) that may detect format strings that include user data. However, taint mode will not catch all format string vulnerabilities and, when it does detect an error, the program will be terminated. Thus, taint mode may stop a vulnerability from allowing an attacker to execute arbitrary code, but such a vulnerability can still be used to terminate the program.

Vendor Information


Perl Developers Unknown

Notified:  December 01, 2005 Updated: December 01, 2005



Vendor Statement

We have not received a statement from the vendor.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

CVSS Metrics

Group Score Vector



This vulnerability was reported to CERT/CC by Steve Christey of MITRE.

This document was written by Hal Burch.

Other Information

CVE IDs: None
Severity Metric: 13.77
Date Public: 2005-12-05
Date First Published: 2005-12-06
Date Last Updated: 2006-01-05 00:21 UTC
Document Revision: 26

Sponsored by CISA.