Emby Server is prone to a cross-site scripting (XSS)
vulnerability.
# SPDX-FileCopyrightText: 2024 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only
CPE = "cpe:/a:emby:emby.releases";
if (description)
{
script_oid("1.3.6.1.4.1.25623.1.0.126955");
script_version("2024-06-28T15:38:46+0000");
script_tag(name:"last_modification", value:"2024-06-28 15:38:46 +0000 (Fri, 28 Jun 2024)");
script_tag(name:"creation_date", value:"2024-06-28 08:29:37 +0000 (Fri, 28 Jun 2024)");
script_tag(name:"cvss_base", value:"4.3");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:N/I:P/A:N");
script_cve_id("CVE-2024-30931");
script_tag(name:"qod_type", value:"remote_banner");
script_tag(name:"solution_type", value:"VendorFix");
script_name("Emby Server < 4.8.3.0 XSS Vulnerability");
script_category(ACT_GATHER_INFO);
script_copyright("Copyright (C) 2024 Greenbone AG");
script_family("Web application abuses");
script_dependencies("gb_emby_server_http_detect.nasl");
script_mandatory_keys("emby/media_server/detected");
script_tag(name:"summary", value:"Emby Server is prone to a cross-site scripting (XSS)
vulnerability.");
script_tag(name:"vuldetect", value:"Checks if a vulnerable version is present on the target host.");
script_tag(name:"insight", value:"Emby Server is prone to a stored XSS via the notifications.html
component.");
script_tag(name:"affected", value:"Emby Server prior to version 4.8.3.0.");
script_tag(name:"solution", value:"Update to version 4.8.3.0 or later.");
script_xref(name:"URL", value:"https://happy-little-accidents.pages.dev/posts/CVE-2024-30931/");
exit(0);
}
include("host_details.inc");
include("version_func.inc");
if (!port = get_app_port(cpe: CPE))
exit(0);
if (!infos = get_app_version_and_location(cpe: CPE, port: port, exit_no_version: TRUE))
exit(0);
version = infos["version"];
location = infos["location"];
if (version_is_less(version: version, test_version: "4.8.3.0")) {
report = report_fixed_ver(installed_version: version, fixed_version: "4.8.3.0", install_path: location);
security_message(port: port, data: report);
exit(0);
}
exit(99);