{"vuid":"VU#362012","idnumber":"362012","name":"TWiki command execution vulnerability","keywords":["Remote code execution in twiki configure script"],"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.","clean_desc":"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.","impact":"A remote attacker may be able to execute arbitrary commands or view arbitrary configuration files on a vulnerable system.","resolution":"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.","workarounds":"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.","sysaffected":"","thanks":"Thanks to the TWiki team for information that was used in this report.","author":"This document was written by Ryan Giobbi.","public":["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"],"cveids":[""],"certadvisory":"","uscerttechnicalalert":null,"datecreated":"2008-09-12T14:16:47Z","publicdate":"2008-09-12T00:00:00Z","datefirstpublished":"2008-09-12T19:00:08Z","dateupdated":"2008-09-17T11:45:52Z","revision":13,"vrda_d1_directreport":"1","vrda_d1_population":"2","vrda_d1_impact":"2","cam_widelyknown":"20","cam_exploitation":"4","cam_internetinfrastructure":"10","cam_population":"10","cam_impact":"15","cam_easeofexploitation":"20","cam_attackeraccessrequired":"20","cam_scorecurrent":"38.25","cam_scorecurrentwidelyknown":"38.25","cam_scorecurrentwidelyknownexploited":"56.25","ipprotocol":"tcp","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":38.25,"vulnote":null}