Executive Summary



This Alert is flagged as TOP 25 Common Weakness Enumeration from CWE/SANS. For more information, you can read this.
Summary
Title TWiki command execution vulnerability
Informations
Name VU#362012 First vendor Publication 2008-09-12
Vendor VU-CERT Last vendor Modification 2008-09-17
Severity (Vendor) N/A Revision M

Security-Database Scoring CVSS v3

Cvss vector : N/A
Overall CVSS Score NA
Base Score NA Environmental Score NA
impact SubScore NA Temporal Score NA
Exploitabality Sub Score NA
 
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector : (AV:N/AC:M/Au:N/C:P/I:P/A:P)
Cvss Base Score 6.8 Attack Range Network
Cvss Impact Score 6.4 Attack Complexity Medium
Cvss Expoit Score 8.6 Authentication None Required
Calculate full CVSS 2.0 Vectors scores

Detail

Vulnerability Note VU#362012

TWiki command execution vulnerability

Overview

The TWiki wiki software fails to validate input passed to certain URLs. By accessing a URL containing the TWiki configuration script, an attacker may be able to read arbitrary files.

I. Description

TWiki is a wiki that is runs in the context of the Apache web server. TWiki is installed by configuring Apache, then accessing a configuration script from a web browser. Before executing the configuration script, the TWiki installation instructions provide a generator for Apache configuration directives that is designed to prevent unauthorized access to the script.

There is a command execution vulnerability in TWiki versions prior to 4.2.3. According to the TWiki download page, this issue can only be exploited if the configure script was not secured as described in step number 8 in the installation guide.

Public exploit code has been released that targets this vulnerability. TWiki servers typically use predictable URLs and vulnerable systems may be found by querying search engines.

II. Impact

A remote attacker may be able to execute arbitrary commands or view arbitrary configuration files on a vulnerable system.

III. Solution

TWiki versions 4.2.0 and higher


The TWiki team has provided a configuration script to address this issue. The script is available here: http://twiki.org/p/pub/Codev/TWikiRelease04x02x03/configure

TWiki versions prior to 4.2.0

See http://twiki.org/cgi-bin/view/Codev/SecurityAlert-CVE-2008-3195#Hotfix_for_older_TWiki_versions for more information and refer to step 8 in the Twiki installation guide.

Make the configure script not executable

Removing, renaming or marking the TWiki configure script (twiki/bin/configure) as not executable will prevent this vulnerability from being exploited.

Restrict access

Restricting access by using a web application or string-matching firewall to block URLs that contain the string /bin/configure may partially mitigate this vulnerability. An example of a string matching rule using iptables is:

    iptables -A INPUT -p tcp --dport 80 -m string --string '/bin/configure' --algo bm -j DROP

This workaround is unlikely to be effective in many cases, such as when the server uses the https protocol. This firewall rule should be tested before using on a production system.

Systems Affected

VendorStatusDate Updated
TWikiVulnerable12-Sep-2008

References


http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide#8
http://twiki.org/cgi-bin/view/TWiki.ApacheConfigGenerator
http://twiki.org/p/pub/Codev/TWikiRelease04x02x03/configure
http://twiki.org/cgi-bin/view/Codev/SecurityAlert-CVE-2008-3195#Hotfix_for_older_TWiki_versions
http://www.milw0rm.com/exploits/6269

Credit

Thanks to the TWiki team for information that was used in this report.

This document was written by Ryan Giobbi.

Other Information

Date Public09/12/2008
Date First Published09/12/2008 03:00:10 PM
Date Last Updated09/17/2008
CERT Advisory 
CVE-ID(s) 
NVD-ID(s) 
US-CERT Technical Alerts 
Metric38.25
Document Revision13

Original Source

Url : http://www.kb.cert.org/vuls/id/362012

CWE : Common Weakness Enumeration

% Id Name
100 % CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (CWE/SANS Top 25)

OVAL Definitions

Definition Id: oval:org.mitre.oval:def:20275
 
Oval ID: oval:org.mitre.oval:def:20275
Title: DSA-1639-1 twiki - command execution
Description: It was discovered that twiki, a web based collaboration platform, didn't properly sanitise the image parameter in its configuration script. This could allow remote users to execute arbitrary commands upon the system, or read any files which were readable by the webserver user.
Family: unix Class: patch
Reference(s): DSA-1639-1
CVE-2008-3195
Version: 5
Platform(s): Debian GNU/Linux 4.0
Product(s): twiki
Definition Synopsis:
Definition Id: oval:org.mitre.oval:def:7915
 
Oval ID: oval:org.mitre.oval:def:7915
Title: DSA-1639 twiki -- command execution
Description: It was discovered that twiki, a web based collaboration platform, didn't properly sanitise the image parameter in its configuration script. This could allow remote users to execute arbitrary commands upon the system, or read any files which were readable by the webserver user.
Family: unix Class: patch
Reference(s): DSA-1639
CVE-2008-3195
Version: 5
Platform(s): Debian GNU/Linux 4.0
Product(s): twiki
Definition Synopsis:

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 15

ExploitDB Exploits

id Description
2008-09-21 TWiki <= 4.2.2 (action) Remote Code Execution Vulnerability

OpenVAS Exploits

Date Description
2008-09-24 Name : Debian Security Advisory DSA 1639-1 (twiki)
File : nvt/deb_1639_1.nasl
2008-09-17 Name : FreeBSD Ports: twiki
File : nvt/freebsd_twiki1.nasl

Open Source Vulnerability Database (OSVDB)

Id Description
48221 TWiki bin/configure image Parameter Traversal Arbitrary File Access/Execution

Nessus® Vulnerability Scanner

Date Description
2008-09-22 Name : The remote Debian host is missing a security-related update.
File : debian_DSA-1639.nasl - Type : ACT_GATHER_INFO
2008-09-15 Name : The remote FreeBSD host is missing a security-related update.
File : freebsd_pkg_9227dcaf827f11dd9cd70050568452ac.nasl - Type : ACT_GATHER_INFO
2008-08-23 Name : The remote web server hosts a CGI script that is affected by multiple vulnera...
File : twiki_image_dir_traversal.nasl - Type : ACT_ATTACK

Alert History

If you want to see full details history, please login or register.
0
Date Informations
2014-02-17 12:07:46
  • Multiple Updates