what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New


Posted Apr 5, 2004
Authored by Greg MacManus | Site idefense.com

Remote exploitation of a buffer overflow in the win32_stat function of ActiveState's ActivePerl may allow arbitrary commands to be executed. No check is made on the length of the string before the copy is made allowing long strings to overwrite control information and execution of arbitrary code possible.

tags | advisory, remote, overflow, arbitrary
advisories | CVE-2004-0377
SHA-256 | 3adc232e9981b7e4b616c8280bed4f979ce9a51c0a72c7d2f4eff52bb06efd16


Change Mirror Download
Perl win32_stat Function Buffer Overflow Vulnerability

iDEFENSE Security Advisory 04.05.04
April 5, 2004


Perl is a popular programming language due to its text manipulation
capabilities and rapid development cycle. It is open source, cross
platform and used for mission critical projects in the public and
private sector.


Remote exploitation of a buffer overflow in the 'win32_stat' function of
ActiveState's ActivePerl and Larry Wall's Perl could allow for the
execution of arbitrary commands.

If the filename passed to the function ends with a backslash character,
it is copied into a fixed length buffer. There is no check made on the
length of the string before the copy, allowing an excessively long
string to overwrite control information, allowing execution of arbitrary

The problem specifically exists within the win32 wrapper to the stat()
routine and hence the Unix builds of Perl are not affected.


The 'win32_stat' function is a wrapper around the 'stat' function and
the file test operators ('-r', '-w', '-e', '-d' etc) on Win32 based

If a web site contains a Perl script that uses any of these functions
with user supplied pathnames, it may be possible to remotely execute


All versions of Perl for Win32 operating systems up to and including
5.8.3 are affected.


The fix will be incorporated into core Perl 5.8.4. Patches are currently
available at the following locations:

Committed to the Perl 5.9.x development branch:


Integrated into Perl 5.8.x maintenance branch as part of:



The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2004-0377 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.


January 09, 2004 Vulnerability discovered by iDEFENSE
February 25, 2004 Initial vendor contact
February 26, 2004 iDEFENSE clients notified
February 26, 2004 Vendor response
April 05, 2004 Public disclosure


Greg MacManus (iDEFENSE Labs) is credited with this discovery.

Get paid for vulnerability research


Copyright (c) 2004 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    0 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags


packet storm

© 2022 Packet Storm. All rights reserved.

Security Services
Hosting By