Software/apt-lib.pl in Webmin before 1.997 lacks HTML escaping for a UI command.
Note that Nessus has not tested for these issues but has instead relied only on the application’s self-reported version number.
#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##
include('compat.inc');
if (description)
{
script_id(165185);
script_version("1.3");
script_set_attribute(attribute:"plugin_modification_date", value:"2022/12/05");
script_cve_id("CVE-2022-36446");
script_name(english:"Webmin < 1.997 RCE");
script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by a remote code execution vulnerability.");
script_set_attribute(attribute:"description", value:
"Software/apt-lib.pl in Webmin before 1.997 lacks HTML escaping for a UI command.
Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version
number.");
script_set_attribute(attribute:"see_also", value:"http://www.webmin.com/changes.html");
script_set_attribute(attribute:"see_also", value:"http://www.webmin.com/security.html");
# https://packetstormsecurity.com/files/167894/Webmin-1.996-Remote-Code-Execution.html
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?dcb6fd4e");
script_set_attribute(attribute:"solution", value:
"Upgrade to Webmin 1.997 or later.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
script_set_attribute(attribute:"cvss_score_source", value:"CVE-2022-36446");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"metasploit_name", value:'Webmin Package Updates RCE');
script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2022/07/17");
script_set_attribute(attribute:"patch_publication_date", value:"2022/07/17");
script_set_attribute(attribute:"plugin_publication_date", value:"2022/09/15");
script_set_attribute(attribute:"potential_vulnerability", value:"true");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:webmin:webmin");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"CGI abuses");
script_copyright(english:"This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("webmin.nasl");
script_require_keys("www/webmin", "Settings/ParanoidReport");
script_require_ports("Services/www", 10000);
exit(0);
}
include('vcf.inc');
if (report_paranoia < 2) audit(AUDIT_PARANOID);
var app = 'Webmin';
var app_info = vcf::combined_get_app_info(app:app);
vcf::check_granularity(app_info:app_info, sig_segments:2);
var constraints = [{ 'fixed_version':'1.997' }];
vcf::check_version_and_report(
app_info:app_info,
constraints:constraints,
severity:SECURITY_HOLE
);