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

Overview

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

Description

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.

Impact

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().

Solution

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

946969
 

Perl Developers Unknown

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

Status

Unknown

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
Base
Temporal
Environmental

References

Acknowledgements

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.