Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   Application (Web Server/CGI)  >   Apache mod_tcl Vendors:   Apache Software Foundation
Apache mod_tcl Format String Bug in set_var() Function May Let Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1017062
SecurityTracker URL:
CVE Reference:   CVE-2006-4154   (Links to External Site)
Date:  Oct 14 2006
Impact:   Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 1.0
Description:   iDEFENSE reported a vulnerability in Apache mod_tcl. A remote user can execute arbitrary code on the target system.

A remote user can send specially crafted data to a script that uses mod_tcl to trigger a format string error and execute arbitrary code on the target system. The code will run with the privileges of the target web service.

The set_var() function is affected.

The vendor was notified on August 16, 2006.

This vulnerability was discovered by Sparfell.

Impact:   A remote user can execute arbitrary code on the target system.
Solution:   The vendor has issued a fixed version (1.0.1), available at:

Vendor URL: (Links to External Site)
Cause:   Boundary error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   None.

 Source Message Contents

Subject:  iDefense Security Advisory 10.13.06: Apache HTTP Server mod_tcl

Apache HTTP Server mod_tcl set_var Format String Vulnerability

iDefense Security Advisory 10.13.06
Oct 13, 2006


The mod_tcl module for the Apache httpd v2.x is a scripting module that
allows a TCL developer to create server side script pages in TCL. It is
available as a contrib package for several distributions.  For more
information, see


Remote exploitation of a format string vulnerability in the mod_tcl
module for the Apache httpd v2.x could allow attackers to execute
arbitrary code in the context of the httpd. 

Due to programmer error, user supplied data is passed as the format
string specifier to several calls to an internally defined variable
argument function.  The function 'set_var' is declared as follows:

  mod_tcl.h:117:void set_var(Tcl_Interp *interp, char *var1,
                             char *var2, const char *fmt, ...);

Several insecure calls to this function are made through out the code,
as seen below:

  tcl_cmds.c:437:         set_var(interp, nm_var, (char*) key,
                                  (char*) val);
  tcl_cmds.c:2231:                set_var(interp, nm_env, env[i],
                                          sptr + 1);
  tcl_core.c:650:                         set_var(interp, namespc,


Successful exploitation allows remote attackers to gain local access to
the vulnerable system in the context of the affected httpd. To exploit
this vulnerability, the attacker must know the location of at least one
tcl server script that is configured to use this module for processing.


iDefense has confirmed the existence of this vulnerability in version
1.0 of mod_tcl for Apache 2.x.


iDefense is currently unaware of any workarounds for this issue.


The Apache mod_tcl team have addressed this vulnerability with mod_tcl
version 1.0.1.  It is available from


The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CVE-2006-4154 to this issue. This is a candidate for inclusion in
the CVE list (, which standardizes names for
security problems.


08/16/2006  Initial vendor notification
10/11/2006  Initial vendor response
10/13/2006  Coordinated public disclosure


This vulnerability was discovered by Sparfell.

Get paid for vulnerability research

Free tools, research and upcoming events


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

To unsubscribe, go here:

Go to the Top of This SecurityTracker Archive Page

Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, LLC