The remote Redhat Enterprise Linux 5 host has one or more packages installed that are affected by multiple vulnerabilities that have been acknowledged by the vendor but will not be patched.
squid: improper access restriction upon Digest Authentication nonce replay could lead to remote code execution (CVE-2020-11945)
Incorrect HTTP Request header comparison in Squid HTTP Proxy 3.5.0.1 through 3.5.22, and 4.0.1 through 4.0.16 results in Collapsed Forwarding feature mistakenly identifying some private responses as being suitable for delivery to multiple clients. (CVE-2016-10003)
Squid 3.x before 3.5.15 and 4.x before 4.0.7 does not properly append data to String objects, which allows remote servers to cause a denial of service (assertion failure and daemon exit) via a long string, as demonstrated by a crafted HTTP Vary header. (CVE-2016-2569)
The Edge Side Includes (ESI) parser in Squid 3.x before 3.5.15 and 4.x before 4.0.7 does not check buffer limits during XML parsing, which allows remote HTTP servers to cause a denial of service (assertion failure and daemon exit) via a crafted XML document, related to esi/CustomParser.cc and esi/CustomParser.h. (CVE-2016-2570)
http.cc in Squid 3.x before 3.5.15 and 4.x before 4.0.7 proceeds with the storage of certain data after a response-parsing failure, which allows remote HTTP servers to cause a denial of service (assertion failure and daemon exit) via a malformed response. (CVE-2016-2571)
http.cc in Squid 4.x before 4.0.7 relies on the HTTP status code after a response-parsing failure, which allows remote HTTP servers to cause a denial of service (assertion failure and daemon exit) via a malformed response. (CVE-2016-2572)
Buffer overflow in cachemgr.cgi in Squid 2.x, 3.x before 3.5.17, and 4.x before 4.0.9 might allow remote attackers to cause a denial of service or execute arbitrary code by seeding manager reports with crafted data. (CVE-2016-4051)
mime_header.cc in Squid before 3.5.18 allows remote attackers to bypass intended same-origin restrictions and possibly conduct cache-poisoning attacks via a crafted HTTP Host header, aka a header smuggling issue. (CVE-2016-4554)
An issue was discovered in Squid through 4.7. When handling the tag esi:when when ESI is enabled, Squid calls ESIExpression::Evaluate. This function uses a fixed stack buffer to hold the expression while it’s being evaluated. When processing the expression, it could either evaluate the top of the stack, or add a new member to the stack. When adding a new member, there is no check to ensure that the stack won’t overflow. (CVE-2019-12519)
An issue was discovered in Squid through 4.7 and 5. When receiving a request, Squid checks its cache to see if it can serve up a response. It does this by making a MD5 hash of the absolute URL of the request.
If found, it servers the request. The absolute URL can include the decoded UserInfo (username and password) for certain protocols. This decoded info is prepended to the domain. This allows an attacker to provide a username that has special characters to delimit the domain, and treat the rest of the URL as a path or query string. An attacker could first make a request to their domain using an encoded username, then when a request for the target domain comes in that decodes to the exact URL, it will serve the attacker’s HTML instead of the real HTML. On Squid servers that also act as reverse proxies, this allows an attacker to gain access to features that only reverse proxies can use, such as ESI. (CVE-2019-12520)
An issue was discovered in Squid through 4.7. When Squid is parsing ESI, it keeps the ESI elements in ESIContext. ESIContext contains a buffer for holding a stack of ESIElements. When a new ESIElement is parsed, it is added via addStackElement. addStackElement has a check for the number of elements in this buffer, but it’s off by 1, leading to a Heap Overflow of 1 element. The overflow is within the same structure so it can’t affect adjacent memory blocks, and thus just leads to a crash while processing.
(CVE-2019-12521)
An issue was discovered in Squid through 4.7. When Squid is run as root, it spawns its child processes as a lesser user, by default the user nobody. This is done via the leave_suid call. leave_suid leaves the Saved UID as 0. This makes it trivial for an attacker who has compromised the child process to escalate their privileges back to root. (CVE-2019-12522)
An issue was discovered in Squid through 4.7. When handling requests from users, Squid checks its rules to see if the request should be denied. Squid by default comes with rules to block access to the Cache Manager, which serves detailed server information meant for the maintainer. This rule is implemented via url_regex. The handler for url_regex rules URL decodes an incoming request. This allows an attacker to encode their URL to bypass the url_regex check, and gain access to the blocked resource. (CVE-2019-12524)
An issue was discovered in Squid before 4.10. It allows a crafted FTP server to trigger disclosure of sensitive information from heap memory, such as information associated with other users’ sessions or non- Squid processes. (CVE-2019-12528)
An issue was discovered in Squid 2.x through 2.7.STABLE9, 3.x through 3.5.28, and 4.x through 4.7. When Squid is configured to use Basic Authentication, the Proxy-Authorization header is parsed via uudecode.
uudecode determines how many bytes will be decoded by iterating over the input and checking its table. The length is then used to start decoding the string. There are no checks to ensure that the length it calculates isn’t greater than the input buffer. This leads to adjacent memory being decoded as well. An attacker would not be able to retrieve the decoded data unless the Squid maintainer had configured the display of usernames on error pages. (CVE-2019-12529)
The cachemgr.cgi web module of Squid through 4.7 has XSS via the user_name or auth parameter.
(CVE-2019-13345)
An issue was discovered in Squid 3.x and 4.x through 4.8 when the append_domain setting is used (because the appended characters do not properly interact with hostname length restrictions). Due to incorrect message processing, it can inappropriately redirect traffic to origins it should not be delivered to.
(CVE-2019-18677)
An issue was discovered in Squid 2.x, 3.x, and 4.x through 4.8. Due to incorrect data management, it is vulnerable to information disclosure when processing HTTP Digest Authentication. Nonce tokens contain the raw byte value of a pointer that sits within heap memory allocation. This information reduces ASLR protections and may aid attackers isolating memory areas to target for remote code execution attacks.
(CVE-2019-18679)
An issue was discovered in http/ContentLengthInterpreter.cc in Squid before 4.12 and 5.x before 5.0.3. A Request Smuggling and Poisoning attack can succeed against the HTTP cache. The client sends an HTTP request with a Content-Length header containing +\ - or an uncommon shell whitespace character prefix to the length field-value. (CVE-2020-15049)
An issue was discovered in Squid before 4.13 and 5.x before 5.0.4. Due to incorrect data validation, HTTP Request Smuggling attacks may succeed against HTTP and HTTPS traffic. This leads to cache poisoning. This allows any client, including browser scripts, to bypass local security and poison the proxy cache and any downstream caches with content from an arbitrary source. When configured for relaxed header parsing (the default), Squid relays headers containing whitespace characters to upstream servers. When this occurs as a prefix to a Content-Length header, the frame length specified will be ignored by Squid (allowing for a conflicting length to be used from another Content-Length header) but relayed upstream. (CVE-2020-15810)
An issue was discovered in Squid before 4.13 and 5.x before 5.0.4. Due to incorrect data validation, HTTP Request Splitting attacks may succeed against HTTP and HTTPS traffic. This leads to cache poisoning. This allows any client, including browser scripts, to bypass local security and poison the browser cache and any downstream caches with content from an arbitrary source. Squid uses a string search instead of parsing the Transfer-Encoding header to find chunked encoding. This allows an attacker to hide a second request inside Transfer-Encoding: it is interpreted by Squid as chunked and split out into a second request delivered upstream. Squid will then deliver two distinct responses to the client, corrupting any downstream caches. (CVE-2020-15811)
Squid before 4.13 and 5.x before 5.0.4 allows a trusted peer to perform Denial of Service by consuming all available CPU cycles during handling of a crafted Cache Digest response message. This only occurs when cache_peer is used with the cache digests feature. The problem exists because peerDigestHandleReply() livelocking in peer_digest.cc mishandles EOF. (CVE-2020-24606)
Note that Nessus has not tested for these issues but has instead relied on the package manager’s report that the package is installed.
#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Red Hat Security Advisory squid. The text
# itself is copyright (C) Red Hat, Inc.
##
include('compat.inc');
if (description)
{
script_id(195512);
script_version("1.0");
script_set_attribute(attribute:"plugin_modification_date", value:"2024/05/11");
script_cve_id(
"CVE-2016-2569",
"CVE-2016-2570",
"CVE-2016-2571",
"CVE-2016-2572",
"CVE-2016-4051",
"CVE-2016-4554",
"CVE-2016-10003",
"CVE-2019-12519",
"CVE-2019-12520",
"CVE-2019-12521",
"CVE-2019-12522",
"CVE-2019-12524",
"CVE-2019-12528",
"CVE-2019-12529",
"CVE-2019-13345",
"CVE-2019-18677",
"CVE-2019-18679",
"CVE-2020-11945",
"CVE-2020-15049",
"CVE-2020-15810",
"CVE-2020-15811",
"CVE-2020-24606"
);
script_name(english:"RHEL 5 : squid (Unpatched Vulnerability)");
script_set_attribute(attribute:"synopsis", value:
"The remote Red Hat 5 host is affected by multiple vulnerabilities that will not be patched.");
script_set_attribute(attribute:"description", value:
"The remote Redhat Enterprise Linux 5 host has one or more packages installed that are affected by multiple
vulnerabilities that have been acknowledged by the vendor but will not be patched.
- squid: improper access restriction upon Digest Authentication nonce replay could lead to remote code
execution (CVE-2020-11945)
- Incorrect HTTP Request header comparison in Squid HTTP Proxy 3.5.0.1 through 3.5.22, and 4.0.1 through
4.0.16 results in Collapsed Forwarding feature mistakenly identifying some private responses as being
suitable for delivery to multiple clients. (CVE-2016-10003)
- Squid 3.x before 3.5.15 and 4.x before 4.0.7 does not properly append data to String objects, which allows
remote servers to cause a denial of service (assertion failure and daemon exit) via a long string, as
demonstrated by a crafted HTTP Vary header. (CVE-2016-2569)
- The Edge Side Includes (ESI) parser in Squid 3.x before 3.5.15 and 4.x before 4.0.7 does not check buffer
limits during XML parsing, which allows remote HTTP servers to cause a denial of service (assertion
failure and daemon exit) via a crafted XML document, related to esi/CustomParser.cc and
esi/CustomParser.h. (CVE-2016-2570)
- http.cc in Squid 3.x before 3.5.15 and 4.x before 4.0.7 proceeds with the storage of certain data after a
response-parsing failure, which allows remote HTTP servers to cause a denial of service (assertion failure
and daemon exit) via a malformed response. (CVE-2016-2571)
- http.cc in Squid 4.x before 4.0.7 relies on the HTTP status code after a response-parsing failure, which
allows remote HTTP servers to cause a denial of service (assertion failure and daemon exit) via a
malformed response. (CVE-2016-2572)
- Buffer overflow in cachemgr.cgi in Squid 2.x, 3.x before 3.5.17, and 4.x before 4.0.9 might allow remote
attackers to cause a denial of service or execute arbitrary code by seeding manager reports with crafted
data. (CVE-2016-4051)
- mime_header.cc in Squid before 3.5.18 allows remote attackers to bypass intended same-origin restrictions
and possibly conduct cache-poisoning attacks via a crafted HTTP Host header, aka a header smuggling
issue. (CVE-2016-4554)
- An issue was discovered in Squid through 4.7. When handling the tag esi:when when ESI is enabled, Squid
calls ESIExpression::Evaluate. This function uses a fixed stack buffer to hold the expression while it's
being evaluated. When processing the expression, it could either evaluate the top of the stack, or add a
new member to the stack. When adding a new member, there is no check to ensure that the stack won't
overflow. (CVE-2019-12519)
- An issue was discovered in Squid through 4.7 and 5. When receiving a request, Squid checks its cache to
see if it can serve up a response. It does this by making a MD5 hash of the absolute URL of the request.
If found, it servers the request. The absolute URL can include the decoded UserInfo (username and
password) for certain protocols. This decoded info is prepended to the domain. This allows an attacker to
provide a username that has special characters to delimit the domain, and treat the rest of the URL as a
path or query string. An attacker could first make a request to their domain using an encoded username,
then when a request for the target domain comes in that decodes to the exact URL, it will serve the
attacker's HTML instead of the real HTML. On Squid servers that also act as reverse proxies, this allows
an attacker to gain access to features that only reverse proxies can use, such as ESI. (CVE-2019-12520)
- An issue was discovered in Squid through 4.7. When Squid is parsing ESI, it keeps the ESI elements in
ESIContext. ESIContext contains a buffer for holding a stack of ESIElements. When a new ESIElement is
parsed, it is added via addStackElement. addStackElement has a check for the number of elements in this
buffer, but it's off by 1, leading to a Heap Overflow of 1 element. The overflow is within the same
structure so it can't affect adjacent memory blocks, and thus just leads to a crash while processing.
(CVE-2019-12521)
- An issue was discovered in Squid through 4.7. When Squid is run as root, it spawns its child processes as
a lesser user, by default the user nobody. This is done via the leave_suid call. leave_suid leaves the
Saved UID as 0. This makes it trivial for an attacker who has compromised the child process to escalate
their privileges back to root. (CVE-2019-12522)
- An issue was discovered in Squid through 4.7. When handling requests from users, Squid checks its rules to
see if the request should be denied. Squid by default comes with rules to block access to the Cache
Manager, which serves detailed server information meant for the maintainer. This rule is implemented via
url_regex. The handler for url_regex rules URL decodes an incoming request. This allows an attacker to
encode their URL to bypass the url_regex check, and gain access to the blocked resource. (CVE-2019-12524)
- An issue was discovered in Squid before 4.10. It allows a crafted FTP server to trigger disclosure of
sensitive information from heap memory, such as information associated with other users' sessions or non-
Squid processes. (CVE-2019-12528)
- An issue was discovered in Squid 2.x through 2.7.STABLE9, 3.x through 3.5.28, and 4.x through 4.7. When
Squid is configured to use Basic Authentication, the Proxy-Authorization header is parsed via uudecode.
uudecode determines how many bytes will be decoded by iterating over the input and checking its table. The
length is then used to start decoding the string. There are no checks to ensure that the length it
calculates isn't greater than the input buffer. This leads to adjacent memory being decoded as well. An
attacker would not be able to retrieve the decoded data unless the Squid maintainer had configured the
display of usernames on error pages. (CVE-2019-12529)
- The cachemgr.cgi web module of Squid through 4.7 has XSS via the user_name or auth parameter.
(CVE-2019-13345)
- An issue was discovered in Squid 3.x and 4.x through 4.8 when the append_domain setting is used (because
the appended characters do not properly interact with hostname length restrictions). Due to incorrect
message processing, it can inappropriately redirect traffic to origins it should not be delivered to.
(CVE-2019-18677)
- An issue was discovered in Squid 2.x, 3.x, and 4.x through 4.8. Due to incorrect data management, it is
vulnerable to information disclosure when processing HTTP Digest Authentication. Nonce tokens contain the
raw byte value of a pointer that sits within heap memory allocation. This information reduces ASLR
protections and may aid attackers isolating memory areas to target for remote code execution attacks.
(CVE-2019-18679)
- An issue was discovered in http/ContentLengthInterpreter.cc in Squid before 4.12 and 5.x before 5.0.3. A
Request Smuggling and Poisoning attack can succeed against the HTTP cache. The client sends an HTTP
request with a Content-Length header containing +\ - or an uncommon shell whitespace character prefix
to the length field-value. (CVE-2020-15049)
- An issue was discovered in Squid before 4.13 and 5.x before 5.0.4. Due to incorrect data validation, HTTP
Request Smuggling attacks may succeed against HTTP and HTTPS traffic. This leads to cache poisoning. This
allows any client, including browser scripts, to bypass local security and poison the proxy cache and any
downstream caches with content from an arbitrary source. When configured for relaxed header parsing (the
default), Squid relays headers containing whitespace characters to upstream servers. When this occurs as a
prefix to a Content-Length header, the frame length specified will be ignored by Squid (allowing for a
conflicting length to be used from another Content-Length header) but relayed upstream. (CVE-2020-15810)
- An issue was discovered in Squid before 4.13 and 5.x before 5.0.4. Due to incorrect data validation, HTTP
Request Splitting attacks may succeed against HTTP and HTTPS traffic. This leads to cache poisoning. This
allows any client, including browser scripts, to bypass local security and poison the browser cache and
any downstream caches with content from an arbitrary source. Squid uses a string search instead of parsing
the Transfer-Encoding header to find chunked encoding. This allows an attacker to hide a second request
inside Transfer-Encoding: it is interpreted by Squid as chunked and split out into a second request
delivered upstream. Squid will then deliver two distinct responses to the client, corrupting any
downstream caches. (CVE-2020-15811)
- Squid before 4.13 and 5.x before 5.0.4 allows a trusted peer to perform Denial of Service by consuming all
available CPU cycles during handling of a crafted Cache Digest response message. This only occurs when
cache_peer is used with the cache digests feature. The problem exists because peerDigestHandleReply()
livelocking in peer_digest.cc mishandles EOF. (CVE-2020-24606)
Note that Nessus has not tested for these issues but has instead relied on the package manager's report that the package
is installed.");
script_set_attribute(attribute:"solution", value:
"The vendor has acknowledged the vulnerabilities but no solution has been provided. Refer to the vendor for remediation
guidance.");
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:POC/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:P/RL:O/RC:C");
script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-11945");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"vendor_unpatched", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2016/02/23");
script_set_attribute(attribute:"plugin_publication_date", value:"2024/05/11");
script_set_attribute(attribute:"plugin_type", value:"local");
script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:6");
script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:squid");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:squid34");
script_set_attribute(attribute:"generated_plugin", value:"current");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Red Hat Local Security Checks");
script_copyright(english:"This script is Copyright (C) 2024 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("ssh_get_info.nasl", "redhat_repos.nasl");
script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
exit(0);
}
include('rpm.inc');
include('rhel.inc');
if (!get_kb_item("global_settings/vendor_unpatched"))
exit(0, "Unpatched Vulnerabilities Detection not active.");
if (!get_kb_item('Host/local_checks_enabled')) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
var os_release = get_kb_item('Host/RedHat/release');
if (isnull(os_release) || 'Red Hat' >!< os_release) audit(AUDIT_OS_NOT, 'Red Hat');
var os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:os_release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, 'Red Hat');
os_ver = os_ver[1];
if (!rhel_check_release(operator: 'ge', os_version: os_ver, rhel_version: '5')) audit(AUDIT_OS_NOT, 'Red Hat 5.x', 'Red Hat ' + os_ver);
if (!get_kb_item('Host/RedHat/rpm-list')) audit(AUDIT_PACKAGE_LIST_MISSING);
var cpu = get_kb_item('Host/cpu');
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ('x86_64' >!< cpu && cpu !~ "^i[3-6]86$" && 's390' >!< cpu && 'aarch64' >!< cpu && 'ppc' >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, 'Red Hat', cpu);
var constraints = [
{
'pkgs': [
{'reference':'squid', 'release':'5', 'rpm_spec_vers_cmp':TRUE, 'unpatched_pkg':'squid'}
]
}
];
var flag = 0;
foreach var constraint_array ( constraints ) {
var repo_relative_urls = NULL;
var enterprise_linux_flag = rhel_repo_urls_has_content_dist_rhel(repo_urls:repo_relative_urls);
foreach var pkg ( constraint_array['pkgs'] ) {
var unpatched_pkg = NULL;
var _release = NULL;
var sp = NULL;
var el_string = NULL;
var rpm_spec_vers_cmp = NULL;
var exists_check = NULL;
var cves = NULL;
if (!empty_or_null(pkg['unpatched_pkg'])) unpatched_pkg = pkg['unpatched_pkg'];
if (!empty_or_null(pkg['release'])) _release = 'RHEL' + pkg['release'];
if (!empty_or_null(pkg['sp'])) sp = pkg['sp'];
if (!empty_or_null(pkg['rpm_spec_vers_cmp'])) rpm_spec_vers_cmp = pkg['rpm_spec_vers_cmp'];
if (!empty_or_null(pkg['exists_check'])) exists_check = pkg['exists_check'];
if (!empty_or_null(pkg['cves'])) cves = pkg['cves'];
if (unpatched_pkg &&
_release &&
(!exists_check || rpm_exists(release:_release, rpm:exists_check)) &&
unpatched_package_exists(release:_release, package:unpatched_pkg, cves: cves)) flag++;
}
}
if (flag)
{
var extra = NULL;
security_report_v4(
port : 0,
severity : SECURITY_HOLE,
extra : unpatched_packages_report()
);
exit(0);
}
else
{
var tested = pkg_tests_get();
if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
else audit(AUDIT_PACKAGE_NOT_INSTALLED, 'squid');
}
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10003
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2569
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2570
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2571
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2572
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4051
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4554
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12519
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12520
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12521
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12522
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12524
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12528
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12529
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13345
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18677
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18679
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11945
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15049
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15810
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15811
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-24606