CVE-2012-6081
published 2013-01-03CVE-2012-6081: Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin…
PriorityP277medium6CVSS 2.0
AVNACMAuSCPIPAP
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
30.57%
98.0th percentile
Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to execute arbitrary code by uploading a file with an executable extension, then accessing it via a direct request to the file in an unspecified directory, as exploited in the wild in July 2012.
Affected
58 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| moinmo | moinmoin | <= 1.9.5 | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
| moinmo | moinmoin | — | — |
Detection & IOCsextracted from sources · hover to see the quote
urlhttp://<target>/WikiSandBox?action=twikidraw&do=modify&target=../../../plugin/action/moinexec.py↗
urlhttp://<target>/WikiSandBox?action=twikidraw&do=save&ticket=<ticket>&target=../../../plugin/action/moinexec.py↗
urlhttp://<target>/WikiSandBox?action=twikidraw&do=save&ticket=<ticket>&target=../../../../moin.wsgi↗
snort
alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET WEB_SPECIFIC_APPS MoinMoin twikidraw Action Traversal File Upload"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"?action=twikidraw"; fast_pattern; content:"&target="; distance:0; content:"../moin.wsgi"; endswith; reference:bugtraq,57082; reference:cve,2012-6081; reference:url,packetstormsecurity.com/files/122079/moinmoin_twikidraw.rb.txt; reference:url,exploit-db.com/exploits/25304/; classtype:web-application-attack; sid:2017074; rev:6; metadata:created_at 2013_06_28, cve CVE_2012_6081, signature_severity Major, updated_at 2024_03_06, reviewed_at 2024_02_06;)
- →Detect POST requests to MoinMoin with URI containing '?action=twikidraw' and '&target=' parameter ending in '../moin.wsgi' — this is the path traversal write to overwrite moin.wsgi for RCE.
- →The exploit first issues a GET to retrieve a ticket token via the twikidraw 'modify' action with a traversal target, then POSTs the payload using the 'save' action with the same traversal target. Detect both phases. ↗
- →Exploitation targets Apache/mod_wsgi deployments by overwriting moin.wsgi. Check for unexpected modification timestamps or content changes on moin.wsgi. ↗
- →The exploit drops a backdoor action plugin at plugin/action/moinexec.py; monitor for creation of unexpected .py files under the MoinMoin plugin/action directory. ↗
- →After writing the webshell, the attacker triggers execution by requesting '?action=moinexec&c=[command]'; monitor for requests with action=moinexec in MoinMoin access logs. ↗
- →The exploit was observed in the wild in July 2012 against the python.org wiki; see http://wiki.python.org/moin/WikiAttack2013 for incident details. ↗
- ·Exploitation requires the attacker to have write permissions on at least one MoinMoin wiki page (e.g. WikiSandBox). Anonymous exploitation is only possible if the wiki allows anonymous editing. ↗
- ·The Metasploit module overwrites moin.wsgi to achieve RCE; it attempts to restore the file post-exploitation but successful restoration is not guaranteed, potentially leaving the target wiki broken. ↗
- ·The RCE vector via moin.wsgi overwrite is specific to Apache/mod_wsgi deployments; other deployment configurations may not be exploitable via this exact method. ↗
- ·CVE-2012-6081 affects MoinMoin versions 1.9.x up to and including 1.9.5; version 1.9.6 contains the fix (patch at hg.moinmo.in/moin/1.9/rev/7e7e1cbb9d3f). ↗
CVSS provenance
nvdv2.06.0MEDIUMAV:N/AC:M/Au:S/C:P/I:P/A:P
ghsa6.0MEDIUM
osv6.0MEDIUM
vulncheck6.0MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
MoinMoin Multiple vulnerable to directory traversal
osv·2022-05-17·CVSS 6.0
CVE-2012-6495 [MEDIUM] MoinMoin Multiple vulnerable to directory traversal
MoinMoin Multiple vulnerable to directory traversal
Multiple directory traversal vulnerabilities in the (1) twikidraw (`action/twikidraw.py`) and (2) anywikidraw (`action/anywikidraw.py`) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to overwrite arbitrary files via unspecified vectors. NOTE: this can be leveraged with CVE-2012-6081 to execute arbitrary code.
GHSA
MoinMoin Multiple unrestricted file upload vulnerabilities
ghsa·2022-05-17
CVE-2012-6081 [MEDIUM] CWE-434 MoinMoin Multiple unrestricted file upload vulnerabilities
MoinMoin Multiple unrestricted file upload vulnerabilities
Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (`action/twikidraw.py`) and (2) anywikidraw (`action/anywikidraw.py`) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to execute arbitrary code by uploading a file with an executable extension, then accessing it via a direct request to the file in an unspecified directory, as exploited in the wild in July 2012.
GHSA
MoinMoin Multiple vulnerable to directory traversal
ghsa·2022-05-17·CVSS 6.0
CVE-2012-6495 [MEDIUM] CWE-22 MoinMoin Multiple vulnerable to directory traversal
MoinMoin Multiple vulnerable to directory traversal
Multiple directory traversal vulnerabilities in the (1) twikidraw (`action/twikidraw.py`) and (2) anywikidraw (`action/anywikidraw.py`) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to overwrite arbitrary files via unspecified vectors. NOTE: this can be leveraged with CVE-2012-6081 to execute arbitrary code.
OSV
MoinMoin Multiple unrestricted file upload vulnerabilities
osv·2022-05-17
CVE-2012-6081 [MEDIUM] MoinMoin Multiple unrestricted file upload vulnerabilities
MoinMoin Multiple unrestricted file upload vulnerabilities
Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (`action/twikidraw.py`) and (2) anywikidraw (`action/anywikidraw.py`) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to execute arbitrary code by uploading a file with an executable extension, then accessing it via a direct request to the file in an unspecified directory, as exploited in the wild in July 2012.
OSV
CVE-2012-6081: Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw
osv·2013-01-03
CVE-2012-6081 CVE-2012-6081: Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw
Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to execute arbitrary code by uploading a file with an executable extension, then accessing it via a direct request to the file in an unspecified directory, as exploited in the wild in July 2012.
OSV
CVE-2012-6495: Multiple directory traversal vulnerabilities in the (1) twikidraw (action/twikidraw
osv·2013-01-03·CVSS 6.0
CVE-2012-6495 [MEDIUM] CVE-2012-6495: Multiple directory traversal vulnerabilities in the (1) twikidraw (action/twikidraw
Multiple directory traversal vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to overwrite arbitrary files via unspecified vectors. NOTE: this can be leveraged with CVE-2012-6081 to execute arbitrary code.
VulnCheck
moinmo moinmoin Unrestricted Upload of File with Dangerous Type
vulncheck·2012·CVSS 6.0
CVE-2012-6081 [MEDIUM] moinmo moinmoin Unrestricted Upload of File with Dangerous Type
moinmo moinmoin Unrestricted Upload of File with Dangerous Type
Multiple unrestricted file upload vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to execute arbitrary code by uploading a file with an executable extension, then accessing it via a direct request to the file in an unspecified directory, as exploited in the wild in July 2012.
Affected: moinmo moinmoin
Required Action: Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
Exploitation References: https://moinmo.in/SecurityFixes; https://www.cve.org/CVERecord?id=CVE-2012-6081
Suricata
ET WEB_SPECIFIC_APPS MoinMoin twikidraw Action Traversal File Upload
suricata·2013-06-28
CVE-2012-6081 ET WEB_SPECIFIC_APPS MoinMoin twikidraw Action Traversal File Upload
ET WEB_SPECIFIC_APPS MoinMoin twikidraw Action Traversal File Upload
Rule: alert http $EXTERNAL_NET any -> $HTTP_SERVERS any (msg:"ET WEB_SPECIFIC_APPS MoinMoin twikidraw Action Traversal File Upload"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"?action=twikidraw"; fast_pattern; content:"&target="; distance:0; content:"../moin.wsgi"; endswith; reference:bugtraq,57082; reference:cve,2012-6081; reference:url,packetstormsecurity.com/files/122079/moinmoin_twikidraw.rb.txt; reference:url,exploit-db.com/exploits/25304/; classtype:web-application-attack; sid:2017074; rev:6; metadata:created_at 2013_06_28, cve CVE_2012_6081, signature_severity Major, updated_at 2024_03_06, reviewed_at 2024_02_06;)
Exploit-DB
MoinMoin - twikidraw Action Traversal Arbitrary File Upload (Metasploit)
exploitdb·2013-06-24
CVE-2012-6495 MoinMoin - twikidraw Action Traversal Arbitrary File Upload (Metasploit)
MoinMoin - twikidraw Action Traversal Arbitrary File Upload (Metasploit)
---
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
require 'msf/core'
class Metasploit3 'MoinMoin twikidraw Action Traversal File Upload',
'Description' => %q{
This module exploits a vulnerability in MoinMoin 1.9.5. The vulnerability
exists on the manage of the twikidraw actions, where a traversal path can be used
in order to upload arbitrary files. Exploitation is achieved on Apached/mod_wsgi
configurations by overwriting moin.wsgi, which allows to execute arbitrary python
code, as exploited in the wild on July, 2012. The user
Exploit-DB
MoinMoin - Arbitrary Command Execution
exploitdb·2013-05-08
CVE-2012-6495 MoinMoin - Arbitrary Command Execution
MoinMoin - Arbitrary Command Execution
---
#!/usr/bin/env python
# -*- coding: utf-8 -*-
ascii = '\x1b[1;31m'###########################################################################
ascii +=' \r\n'#
ascii +=' ██████████ ██████ ███ ███ ███ ██████████ ████████ ███ ███████ \r\n'#
ascii +=' ███████████ ████████ ███ ████ ███ ███████████ ████████ ███ ███████ \r\n'#
ascii +=' ██▒ ██▒ ██▒ ██▒ ███ ██▒ ██▒█▒███ ██▒ ██▒ ██▒ ██▒ ██▒ ██▒ \r\n'#
ascii +=' ▒█▒ ▒█▒ ▒█▒ ▒█▒ █▒█ ▒█▒ ▒█▒▒█▒█▒ ▒█▒ ▒█▒ ▒█▒ ▒█▒ ▒█▒ ▒█▒ \r\n'#
ascii +=' █▒▒ ▒▒█ █▒█ █▒█ ▒█▒ ▒▒█ █▒█ ▒▒█▒ █▒▒ ▒▒█ █▒█ █▒▒▒░▒ █▒▒ █▒▒ \r\n'#
ascii +=' ▒█▒ ▒ ▒█▒ ▒█▒ ▒▒▒ ▒▒▒ ▒█▒ ▒▒▒ ▒█▒ ▒ ▒█▒ ▒▒▒▒▒░ ▒▒▒ ▒▒▒ \r\n'#
ascii +=' ▒▒░ ▒▒░ ▒▒░ ▒▒▒ ▒▒░ ▒▒░ ▒▒▒ ▒▒░ ▒▒░ ▒▒░ ▒▒░ ▒▒░ \r\n'#
ascii +=' ░▒░ ░▒░ ░▒░ ▒░▒ ░▒░ ░▒░ ▒░▒ ░▒░ ░▒░ ░▒░ ░▒░ ░▒░ \r\n'#
ascii
Metasploit
MoinMoin twikidraw Action Traversal File Upload
metasploit
MoinMoin twikidraw Action Traversal File Upload
MoinMoin twikidraw Action Traversal File Upload
This module exploits a vulnerability in MoinMoin 1.9.5. The vulnerability exists on the manage of the twikidraw actions, where a traversal path can be used in order to upload arbitrary files. Exploitation is achieved on Apached/mod_wsgi configurations by overwriting moin.wsgi, which allows to execute arbitrary python code, as exploited in the wild on July, 2012. This module is "ManualRanking," and the user is warned to use this module at his own risk since it will overwrite the moin.wsgi file, required for the correct working of the MoinMoin wiki. While the exploit will try to restore the attacked application at post exploitation, successful restoration cannot be guaranteed.
Bugzilla
CVE-2012-6495 moin: Multiple directory traversal flaws in twikidraw and anywikidraw
bugzilla·2013-01-03·CVSS 6.0
CVE-2012-6495 [MEDIUM] CVE-2012-6495 moin: Multiple directory traversal flaws in twikidraw and anywikidraw
CVE-2012-6495 moin: Multiple directory traversal flaws in twikidraw and anywikidraw
Common Vulnerabilities and Exposures assigned an identifier CVE-2012-6495 to the following vulnerability:
Multiple directory traversal vulnerabilities in the (1) twikidraw (action/twikidraw.py) and (2) anywikidraw (action/anywikidraw.py) actions in MoinMoin before 1.9.6 allow remote authenticated users with write permissions to overwrite arbitrary files via unspecified vectors. NOTE: this can be leveraged with CVE-2012-6081 to execute arbitrary code.
References:
[1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6495
[2] http://www.openwall.com/lists/oss-security/2012/12/29/6
[3] http://www.openwall.com/lists/oss-security/2012/12/30/4
[4] https://bugs.launchpad.net/ubuntu/+source/moin/+bug/109459
Bugzilla
CVE-2012-6081 moinmoin: remote code execution vulnerability
bugzilla·2012-12-31·CVSS 6.0
CVE-2012-6081 [MEDIUM] CVE-2012-6081 moinmoin: remote code execution vulnerability
CVE-2012-6081 moinmoin: remote code execution vulnerability
A remote code execution vulnerability was found in MoinMoin wiki, versions 1.9.x up to (and including) 1.9.5. The method save in class
AnyWikiDraw (action/anywikidraw.py) and class TWikiDraw (action/twikidraw.py) do not filter user supplied input correctly, which leads to a path traversal vulnerability, which can be exploited to execute arbitrary code with moin's privileges. An exploit was seen in the wild.
Details can be found at: http://moinmo.in/SecurityFixes
A fix is available at: http://hg.moinmo.in/moin/1.9/rev/7e7e1cbb9d3f
Reference:
http://seclists.org/oss-sec/2012/q4/522
This issue has been assigned CVE-2012-6081
Discussion:
Created moin tracking bugs for this issue
Affects: fedora-all [bug 890906]
Affects: epel-5
Bugzilla
CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [epel-5]
bugzilla·2012-12-31·CVSS 6.4
CVE-2012-6081 [MEDIUM] CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [epel-5]
CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [epel-5]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora EPEL.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When creating a Bodhi update request, please use the bodhi submission link
noted in the next comment(s). This will include the bug IDs of this
tracking bug as well as the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
Bodhi notes field when available.
epel-5 tracking
Bugzilla
CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [fedora-all]
bugzilla·2012-12-31·CVSS 6.4
CVE-2012-6081 [MEDIUM] CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [fedora-all]
CVE-2012-6081 CVE-2012-6082 CVE-2012-6080 CVE-2012-6495 moin various flaws [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When creating a Bodhi update request, please use the bodhi submission link
noted in the next comment(s). This will include the bug IDs of this
tracking bug as well as the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
Bodhi notes field when available.
Please note: this
http://hg.moinmo.in/moin/1.9/rev/7e7e1cbb9d3fhttp://moinmo.in/MoinMoinRelease1.9http://moinmo.in/SecurityFixeshttp://secunia.com/advisories/51663http://secunia.com/advisories/51676http://secunia.com/advisories/51696http://ubuntu.com/usn/usn-1680-1http://www.debian.org/security/2012/dsa-2593http://www.exploit-db.com/exploits/25304http://www.openwall.com/lists/oss-security/2012/12/29/6http://www.openwall.com/lists/oss-security/2012/12/30/4http://www.securityfocus.com/bid/57082https://bugs.launchpad.net/ubuntu/+source/moin/+bug/1094599http://hg.moinmo.in/moin/1.9/rev/7e7e1cbb9d3fhttp://moinmo.in/MoinMoinRelease1.9http://moinmo.in/SecurityFixeshttp://secunia.com/advisories/51663http://secunia.com/advisories/51676http://secunia.com/advisories/51696http://ubuntu.com/usn/usn-1680-1http://www.debian.org/security/2012/dsa-2593http://www.exploit-db.com/exploits/25304http://www.openwall.com/lists/oss-security/2012/12/29/6http://www.openwall.com/lists/oss-security/2012/12/30/4http://www.securityfocus.com/bid/57082https://bugs.launchpad.net/ubuntu/+source/moin/+bug/1094599
2013-01-03
Published
Exploited in the wild