Vulnerabilities > CVE-2006-4542 - Cross-site Scripting vulnerability in multiple products
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
Webmin before 1.296 and Usermin before 1.226 do not properly handle a URL with a null ("%00") character, which allows remote attackers to conduct cross-site scripting (XSS), read CGI program source code, list directories, and possibly execute programs.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Cross Site Scripting through Log Files An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
- Embedding Scripts in Non-Script Elements This attack is a form of Cross-Site Scripting (XSS) where malicious scripts are embedded in elements that are not expected to host scripts such as image tags (<img>), comments in XML documents (< !-CDATA->), etc. These tags may not be subject to the same input validation, output validation, and other content filtering and checking routines, so this can create an opportunity for an attacker to tunnel through the application's elements and launch a XSS attack through other elements. As with all remote attacks, it is important to differentiate the ability to launch an attack (such as probing an internal network for unpatched servers) and the ability of the remote attacker to collect and interpret the output of said attack.
- Embedding Scripts within Scripts An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
- Cross-Site Scripting in Error Pages An attacker distributes a link (or possibly some other query structure) with a request to a third party web server that is malformed and also contains a block of exploit code in order to have the exploit become live code in the resulting error page. When the third party web server receives the crafted request and notes the error it then creates an error message that echoes the malformed message, including the exploit. Doing this converts the exploit portion of the message into to valid language elements that are executed by the viewing browser. When a victim executes the query provided by the attacker the infected error message error message is returned including the exploit code which then runs in the victim's browser. XSS can result in execution of code as well as data leakage (e.g. session cookies can be sent to the attacker). This type of attack is especially dangerous since the exploit appears to come from the third party web server, who the victim may trust and hence be more vulnerable to deception.
- Cross-Site Scripting Using Alternate Syntax The attacker uses alternate forms of keywords or commands that result in the same action as the primary form but which may not be caught by filters. For example, many keywords are processed in a case insensitive manner. If the site's web filtering algorithm does not convert all tags into a consistent case before the comparison with forbidden keywords it is possible to bypass filters (e.g., incomplete black lists) by using an alternate case structure. For example, the "script" tag using the alternate forms of "Script" or "ScRiPt" may bypass filters where "script" is the only form tested. Other variants using different syntax representations are also possible as well as using pollution meta-characters or entities that are eventually ignored by the rendering engine. The attack can result in the execution of otherwise prohibited functionality.
Nessus
NASL family CGI abuses NASL id USERMIN_1226_INFO_DISCLOSURE.NASL description The version of Usermin installed on the remote host is affected by an information disclosure vulnerability due to the Perl script last seen 2020-06-01 modified 2020-06-02 plugin id 77705 published 2014-09-16 reporter This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/77705 title Usermin Null Byte Filtering Information Disclosure code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(77705); script_version("1.5"); script_cvs_date("Date: 2019/11/25"); script_cve_id("CVE-2006-4542"); script_bugtraq_id(19820); script_name(english:"Usermin Null Byte Filtering Information Disclosure"); script_summary(english:"Checks if nulls in a URL are filtered by miniserv.pl."); script_set_attribute(attribute:"synopsis", value: "The remote web server is affected by an information disclosure vulnerability."); script_set_attribute(attribute:"description", value: "The version of Usermin installed on the remote host is affected by an information disclosure vulnerability due to the Perl script 'miniserv.pl' failing to properly filter null characters from URLs. An attacker could exploit this to reveal the source code of CGI scripts, obtain directory listings, or launch cross-site scripting attacks against the affected application."); script_set_attribute(attribute:"see_also", value:"http://www.webmin.com/security.html"); script_set_attribute(attribute:"solution", value: "Upgrade to Usermin 1.226 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"exploited_by_nessus", value:"true"); script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990); script_set_attribute(attribute:"vuln_publication_date", value:"2006/09/01"); script_set_attribute(attribute:"patch_publication_date", value:"2006/09/15"); script_set_attribute(attribute:"plugin_publication_date", value:"2014/09/16"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:webmin:usermin"); script_set_attribute(attribute:"cpe", value:"cpe:/a:usermin:usermin"); script_end_attributes(); script_category(ACT_ATTACK); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("usermin_detect.nbin"); script_require_keys("www/usermin"); script_require_ports("Services/www", 20000); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); app = "Usermin"; port = get_http_port(default:20000, embedded: TRUE); get_kb_item_or_exit('www/'+port+'/usermin'); dir = '/'; install_url = build_url(port:port, qs:dir); # Some files don't require authentication; eg, those matching the # pattern '^[A-Za-z0-9\\-/]+\\.gif'. So request a bogus gif file; if # nulls are filtered, we'll get an error saying "Error - File not # found"; otherwise, we'll get a login form because the null will # cause the regex to fail. # First send a request to the fake image and ensure we don't get a # login page. Prevents FP with earlier releases which don't respond # to this attack method filename = rand_str(); res = http_send_recv3( method : "GET", item : dir + filename + ".gif", port : port, fetch404 : TRUE, exit_on_fail : TRUE ); if ("<form action=/session_login.cgi " >!< res[2]) { attack = filename + "%00.gif"; res = http_send_recv3( method : "GET", item : dir + attack, port : port, exit_on_fail : TRUE ); # There's a problem if we see a login form. if ("<form action=/session_login.cgi " >< res[2]) { set_kb_item(name: 'www/'+port+'/XSS', value: TRUE); if (report_verbosity > 0) { report = '\n' + 'Nessus was able to verify this issue with the following URL :' + '\n' + '\n' + install_url + attack + '\n'; security_warning(port:port, extra:report); } else security_warning(port); exit(0); } } audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
NASL family Debian Local Security Checks NASL id DEBIAN_DSA-1199.NASL description Several vulnerabilities have been identified in webmin, a web-based administration toolkit. The Common Vulnerabilities and Exposures project identifies the following vulnerabilities : - CVE-2005-3912 A format string vulnerability in miniserv.pl could allow an attacker to cause a denial of service by crashing the application or exhausting system resources, and could potentially allow arbitrary code execution. - CVE-2006-3392 Improper input sanitization in miniserv.pl could allow an attacker to read arbitrary files on the webmin host by providing a specially crafted URL path to the miniserv http server. - CVE-2006-4542 Improper handling of null characters in URLs in miniserv.pl could allow an attacker to conduct cross-site scripting attacks, read CGI program source code, list local directories, and potentially execute arbitrary code. Stable updates are available for alpha, amd64, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390 and sparc. last seen 2020-06-01 modified 2020-06-02 plugin id 22908 published 2006-10-25 reporter This script is Copyright (C) 2006-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/22908 title Debian DSA-1199-1 : webmin - multiple vulnerabilities code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DSA-1199. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(22908); script_version("1.19"); script_cvs_date("Date: 2019/08/02 13:32:20"); script_cve_id("CVE-2005-3912", "CVE-2006-3392", "CVE-2006-4542"); script_bugtraq_id(15629, 18744, 19820); script_xref(name:"DSA", value:"1199"); script_name(english:"Debian DSA-1199-1 : webmin - multiple vulnerabilities"); script_summary(english:"Checks dpkg output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security-related update." ); script_set_attribute( attribute:"description", value: "Several vulnerabilities have been identified in webmin, a web-based administration toolkit. The Common Vulnerabilities and Exposures project identifies the following vulnerabilities : - CVE-2005-3912 A format string vulnerability in miniserv.pl could allow an attacker to cause a denial of service by crashing the application or exhausting system resources, and could potentially allow arbitrary code execution. - CVE-2006-3392 Improper input sanitization in miniserv.pl could allow an attacker to read arbitrary files on the webmin host by providing a specially crafted URL path to the miniserv http server. - CVE-2006-4542 Improper handling of null characters in URLs in miniserv.pl could allow an attacker to conduct cross-site scripting attacks, read CGI program source code, list local directories, and potentially execute arbitrary code. Stable updates are available for alpha, amd64, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390 and sparc." ); script_set_attribute( attribute:"see_also", value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=341394" ); script_set_attribute( attribute:"see_also", value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381537" ); script_set_attribute( attribute:"see_also", value:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391284" ); script_set_attribute( attribute:"see_also", value:"https://security-tracker.debian.org/tracker/CVE-2005-3912" ); script_set_attribute( attribute:"see_also", value:"https://security-tracker.debian.org/tracker/CVE-2006-3392" ); script_set_attribute( attribute:"see_also", value:"https://security-tracker.debian.org/tracker/CVE-2006-4542" ); script_set_attribute( attribute:"see_also", value:"http://www.debian.org/security/2006/dsa-1199" ); script_set_attribute( attribute:"solution", value: "Upgrade the webmin (1.180-3sarge1) package. For the stable distribution (sarge), these problems have been fixed in version 1.180-3sarge1. Webmin is not included in unstable (sid) or testing (etch), so these problems are not present." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"exploit_framework_core", value:"true"); script_set_attribute(attribute:"exploit_framework_canvas", value:"true"); script_set_attribute(attribute:"canvas_package", value:'CANVAS'); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:webmin"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:3.1"); script_set_attribute(attribute:"patch_publication_date", value:"2006/10/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2006/10/25"); script_set_attribute(attribute:"vuln_publication_date", value:"2005/11/29"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2006-2019 Tenable Network Security, Inc."); script_family(english:"Debian Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("debian_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian"); if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (deb_check(release:"3.1", prefix:"webmin", reference:"1.180-3sarge1")) flag++; if (deb_check(release:"3.1", prefix:"webmin-core", reference:"1.180-3sarge1")) flag++; if (flag) { if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get()); else security_hole(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Mandriva Local Security Checks NASL id MANDRAKE_MDKSA-2006-170.NASL description Webmin before 1.296 and Usermin before 1.226 does not properly handle a URL with a null ( last seen 2020-06-01 modified 2020-06-02 plugin id 24556 published 2007-02-18 reporter This script is Copyright (C) 2007-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/24556 title Mandrake Linux Security Advisory : webmin (MDKSA-2006:170-1) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Mandrake Linux Security Advisory MDKSA-2006:170. # The text itself is copyright (C) Mandriva S.A. # include("compat.inc"); if (description) { script_id(24556); script_version ("1.15"); script_cvs_date("Date: 2019/08/02 13:32:48"); script_cve_id("CVE-2006-4542"); script_xref(name:"MDKSA", value:"2006:170-1"); script_name(english:"Mandrake Linux Security Advisory : webmin (MDKSA-2006:170-1)"); script_summary(english:"Checks rpm output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Mandrake Linux host is missing a security update." ); script_set_attribute( attribute:"description", value: "Webmin before 1.296 and Usermin before 1.226 does not properly handle a URL with a null ('%00') character, which allows remote attackers to conduct cross-site scripting (XSS), read CGI program source code, list directories, and possibly execute programs. Updated packages have been patched to correct this issue. Update : Packages are now available for Mandriva Linux 2007." ); script_set_attribute( attribute:"solution", value:"Update the affected webmin package." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:webmin"); script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2007"); script_set_attribute(attribute:"patch_publication_date", value:"2006/09/27"); script_set_attribute(attribute:"plugin_publication_date", value:"2007/02/18"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2007-2019 Tenable Network Security, Inc."); script_family(english:"Mandriva Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/rpm-list"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux"); if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu); flag = 0; if (rpm_check(release:"MDK2007.0", reference:"webmin-1.290-4.1mdv2007.0", yank:"mdv")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family CGI abuses NASL id WEBMIN_1296.NASL description The version of Webmin installed on the remote host is affected by an information disclosure vulnerability due to the Perl script last seen 2020-06-01 modified 2020-06-02 plugin id 22300 published 2006-09-02 reporter This script is Copyright (C) 2006-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/22300 title Webmin Null Byte Filtering Information Disclosure code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(22300); script_version("1.23"); script_cvs_date("Date: 2018/08/06 14:03:14"); script_cve_id("CVE-2006-4542"); script_bugtraq_id(19820); script_name(english:"Webmin Null Byte Filtering Information Disclosure"); script_summary(english:"Checks if nulls in a URL are filtered by 'miniserv.pl'."); script_set_attribute(attribute:"synopsis", value: "The remote web server is affected by an information disclosure vulnerability."); script_set_attribute(attribute:"description", value: "The version of Webmin installed on the remote host is affected by an information disclosure vulnerability due to the Perl script 'miniserv.pl' failing to properly filter null characters from URLs. An attacker could exploit this to reveal the source code of CGI scripts, obtain directory listings, or launch cross-site scripting attacks against the affected application."); script_set_attribute(attribute:"see_also", value:"http://www.lac.co.jp/business/sns/intelligence/SNSadvisory_e/89_e.html"); script_set_attribute(attribute:"see_also", value:"http://www.webmin.com/security.html"); script_set_attribute(attribute:"solution", value:"Upgrade to Webmin version 1.296 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required"); script_set_attribute(attribute:"exploit_available", value:"false"); script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990); script_set_attribute(attribute:"vuln_publication_date", value:"2006/09/01"); script_set_attribute(attribute:"patch_publication_date", value:"2006/09/15"); script_set_attribute(attribute:"plugin_publication_date", value:"2006/09/02"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:webmin:webmin"); script_set_attribute(attribute:"exploited_by_nessus", value:"true"); script_end_attributes(); script_category(ACT_ATTACK); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2006-2018 Tenable Network Security, Inc."); script_dependencies("webmin.nasl"); script_require_keys("www/webmin"); script_require_ports("Services/www", 10000); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); app = 'Webmin'; port = get_http_port(default:10000, embedded: TRUE); get_kb_item_or_exit('www/'+port+'/webmin'); dir = "/"; install_url = build_url(port:port, qs:dir); # Some files don't require authentication; eg, those matching the # pattern '^[A-Za-z0-9\\-/]+\\.gif'. So request a bogus gif file; if # nulls are filtered, we'll get an error saying "Error - File not # found"; otherwise, we'll get a login form because the null will # cause the regex to fail. # First send a request to the fake image and ensure we don't get a # login page. Prevents FP with earlier releases which don't respond # to this attack method filename = rand_str(); res = http_send_recv3( method : "GET", item : dir + filename + ".gif", port : port, fetch404 : TRUE, exit_on_fail : TRUE ); if ("<form action=/session_login.cgi " >!< res[2]) { attack = filename + "%00.gif"; res = http_send_recv3( method : "GET", item : dir + attack, port : port, exit_on_fail : TRUE ); # There's a problem if we see a login form. if ("<form action=/session_login.cgi " >< res[2]) { set_kb_item(name:'www/'+port+'/XSS', value:TRUE); if (report_verbosity > 0) { report = '\n' + 'Nessus was able to verify this issue with the following URL :' + '\n' + '\n' + install_url + attack + '\n'; security_warning(port:port, extra:report); } else security_warning(port); exit(0); } } audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
References
- http://www.lac.co.jp/business/sns/intelligence/SNSadvisory_e/89_e.html
- http://jvn.jp/jp/JVN%2399776858/index.html
- http://webmin.com/security.html
- http://secunia.com/advisories/21690
- http://securitytracker.com/id?1016776
- http://securitytracker.com/id?1016777
- http://www.securityfocus.com/bid/19820
- http://secunia.com/advisories/22087
- http://secunia.com/advisories/22114
- http://www.debian.org/security/2006/dsa-1199
- http://secunia.com/advisories/22556
- http://www.osvdb.org/28337
- http://www.osvdb.org/28338
- http://www.mandriva.com/security/advisories?name=MDKSA-2006:170
- http://www.vupen.com/english/advisories/2006/3424
- https://exchange.xforce.ibmcloud.com/vulnerabilities/28699