CVE Vulnerabilities

CVE-2018-11784

URL Redirection to Untrusted Site ('Open Redirect')

Published: Oct 04, 2018 | Modified: Dec 08, 2023
CVSS 3.x
4.3
MEDIUM
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
CVSS 2.x
4.3 MEDIUM
AV:N/AC:M/Au:N/C:N/I:P/A:N
RedHat/V2
RedHat/V3
5.3 MODERATE
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Ubuntu
MEDIUM

When the default servlet in Apache Tomcat versions 9.0.0.M1 to 9.0.11, 8.5.0 to 8.5.33 and 7.0.23 to 7.0.90 returned a redirect to a directory (e.g. redirecting to /foo/ when the user requested /foo) a specially crafted URL could be used to cause the redirect to be generated to any URI of the attackers choice.

Weakness

A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.

Affected Software

Name Vendor Start Version End Version
Tomcat Apache 7.0.23 (including) 7.0.90 (including)
Tomcat Apache 8.5.0 (including) 8.5.33 (including)
Tomcat Apache 9.0.1 (including) 9.0.11 (including)
Tomcat Apache 9.0.0 (including) 9.0.0 (including)
Tomcat Apache 9.0.0-milestone1 (including) 9.0.0-milestone1 (including)
Tomcat Apache 9.0.0-milestone10 (including) 9.0.0-milestone10 (including)
Tomcat Apache 9.0.0-milestone11 (including) 9.0.0-milestone11 (including)
Tomcat Apache 9.0.0-milestone12 (including) 9.0.0-milestone12 (including)
Tomcat Apache 9.0.0-milestone13 (including) 9.0.0-milestone13 (including)
Tomcat Apache 9.0.0-milestone14 (including) 9.0.0-milestone14 (including)
Tomcat Apache 9.0.0-milestone15 (including) 9.0.0-milestone15 (including)
Tomcat Apache 9.0.0-milestone16 (including) 9.0.0-milestone16 (including)
Tomcat Apache 9.0.0-milestone17 (including) 9.0.0-milestone17 (including)
Tomcat Apache 9.0.0-milestone18 (including) 9.0.0-milestone18 (including)
Tomcat Apache 9.0.0-milestone19 (including) 9.0.0-milestone19 (including)
Tomcat Apache 9.0.0-milestone2 (including) 9.0.0-milestone2 (including)
Tomcat Apache 9.0.0-milestone20 (including) 9.0.0-milestone20 (including)
Tomcat Apache 9.0.0-milestone21 (including) 9.0.0-milestone21 (including)
Tomcat Apache 9.0.0-milestone22 (including) 9.0.0-milestone22 (including)
Tomcat Apache 9.0.0-milestone23 (including) 9.0.0-milestone23 (including)
Tomcat Apache 9.0.0-milestone24 (including) 9.0.0-milestone24 (including)
Tomcat Apache 9.0.0-milestone25 (including) 9.0.0-milestone25 (including)
Tomcat Apache 9.0.0-milestone26 (including) 9.0.0-milestone26 (including)
Tomcat Apache 9.0.0-milestone27 (including) 9.0.0-milestone27 (including)
Tomcat Apache 9.0.0-milestone3 (including) 9.0.0-milestone3 (including)
Tomcat Apache 9.0.0-milestone4 (including) 9.0.0-milestone4 (including)
Tomcat Apache 9.0.0-milestone5 (including) 9.0.0-milestone5 (including)
Tomcat Apache 9.0.0-milestone6 (including) 9.0.0-milestone6 (including)
Tomcat Apache 9.0.0-milestone7 (including) 9.0.0-milestone7 (including)
Tomcat Apache 9.0.0-milestone8 (including) 9.0.0-milestone8 (including)
Tomcat Apache 9.0.0-milestone9 (including) 9.0.0-milestone9 (including)
Red Hat Enterprise Linux 7 RedHat tomcat-0:7.0.76-9.el7_6 *
Red Hat Enterprise Linux 8 RedHat pki-deps:10.6-8000020190524054914.55190bc5 *
Red Hat JBoss Web Server 3.1 RedHat tomcat *
Red Hat JBoss Web Server 3 for RHEL 6 RedHat tomcat7-0:7.0.70-31.ep7.el6 *
Red Hat JBoss Web Server 3 for RHEL 6 RedHat tomcat8-0:8.0.36-35.ep7.el6 *
Red Hat JBoss Web Server 3 for RHEL 6 RedHat tomcat-native-0:1.2.17-18.redhat_18.ep7.el6 *
Red Hat JBoss Web Server 3 for RHEL 7 RedHat tomcat7-0:7.0.70-31.ep7.el7 *
Red Hat JBoss Web Server 3 for RHEL 7 RedHat tomcat8-0:8.0.36-35.ep7.el7 *
Red Hat JBoss Web Server 3 for RHEL 7 RedHat tomcat-native-0:1.2.17-18.redhat_18.ep7.el7 *
Red Hat JBoss Web Server 5.0 RedHat *
Red Hat JBoss Web Server 5.0 on RHEL 6 RedHat jws5-tomcat-0:9.0.7-12.redhat_12.1.el6jws *
Red Hat JBoss Web Server 5.0 on RHEL 7 RedHat jws5-tomcat-0:9.0.7-12.redhat_12.1.el7jws *
Tomcat6 Ubuntu esm-apps/xenial *
Tomcat6 Ubuntu esm-infra-legacy/trusty *
Tomcat6 Ubuntu precise/esm *
Tomcat6 Ubuntu trusty *
Tomcat6 Ubuntu trusty/esm *
Tomcat6 Ubuntu upstream *
Tomcat6 Ubuntu xenial *
Tomcat7 Ubuntu bionic *
Tomcat7 Ubuntu cosmic *
Tomcat7 Ubuntu esm-apps/bionic *
Tomcat7 Ubuntu esm-apps/xenial *
Tomcat7 Ubuntu trusty *
Tomcat7 Ubuntu upstream *
Tomcat7 Ubuntu xenial *
Tomcat8 Ubuntu bionic *
Tomcat8 Ubuntu cosmic *
Tomcat8 Ubuntu upstream *
Tomcat8 Ubuntu xenial *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • Use a list of approved URLs or domains to be used for redirection.
  • When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
  • For example, ID 1 could map to “/login.asp” and ID 2 could map to “http://www.example.com/". Features such as the ESAPI AccessReferenceMap [REF-45] provide this capability.
  • Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls.
  • Many open redirect problems occur because the programmer assumed that certain inputs could not be modified, such as cookies and hidden form fields.

References