ID CVE-2021-27923
Summary Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICO container, and thus an attempted memory allocation can be very large.
References
Vulnerable Configurations
  • cpe:2.3:a:python:pillow:-:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:-:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.3:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.3:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.4:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.4:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.5:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.5:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.6:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.6:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.3:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.3:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.4:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.4:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.5:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.5:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.6:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.6:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.7:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.7:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:1.7.8:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.8:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.2.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.2.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.2.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.2.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.3:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.3:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.0:rc1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.0:rc1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.7.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.7.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev0:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev0:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev2:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev2:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.0.0:rc1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.0.0:rc1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.3.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.3.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.1.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.1.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.2.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.2.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.4.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.4.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.2.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.2.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.2.3:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.2.3:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:7.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:7.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:7.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:7.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:7.1.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:7.1.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:7.1.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:7.1.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:7.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:7.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:8.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:8.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:8.0.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:8.0.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:8.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:8.1.0:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
CVSS
Base: 5.0 (as of 12-07-2022 - 17:42)
Impact:
Exploitability:
CWE CWE-20
CAPEC
  • Blind SQL Injection
    Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the adversary constructs input strings that probe the target through simple Boolean SQL expressions. The adversary can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the adversary determines how and where the target is vulnerable to SQL Injection.
  • Overflow Variables and Tags
    This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The attacker crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
  • Postfix, Null Terminate, and Backslash
    If a string is passed through a filter of some kind, then a terminal NULL may not be valid. Using alternate representation of NULL allows an attacker to embed the NULL mid-string while postfixing the proper data so that the filter is avoided. One example is a filter that looks for a trailing slash character. If a string insertion is possible, but the slash must exist, an alternate encoding of NULL in mid-string may be used.
  • Web Logs Tampering
    Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.
  • Signature Spoof
    An attacker generates a message or datablock that causes the recipient to believe that the message or datablock was generated and cryptographically signed by an authoritative or reputable source, misleading a victim or victim operating system into performing malicious actions.
  • Using Unicode Encoding to Bypass Validation Logic
    An attacker may provide a Unicode string to a system component that is not Unicode aware and use that to circumvent the filter or cause the classifying mechanism to fail to properly understanding the request. That may allow the attacker to slip malicious data past the content filter and/or possibly cause the application to route the request incorrectly.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.
  • Buffer Overflow in an API Call
    This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An attacker who has access to an API may try to embed malicious code in the API function call and exploit a buffer overflow vulnerability in the function's implementation. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
  • XSS Using MIME Type Mismatch
    An adversary creates a file with scripting content but where the specified MIME type of the file is such that scripting is not expected. The adversary tricks the victim into accessing a URL that responds with the script file. Some browsers will detect that the specified MIME type of the file does not match the actual type of its content and will automatically switch to using an interpreter for the real content type. If the browser does not invoke script filters before doing this, the adversary's script may run on the target unsanitized, possibly revealing the victim's cookies or executing arbitrary script in their browser.
  • XPath Injection
    An attacker can craft special user-controllable input consisting of XPath expressions to inject the XML database and bypass authentication or glean information that he normally would not be able to. XPath Injection enables an attacker to talk directly to the XML database, thus bypassing the application completely. XPath Injection results from the failure of an application to properly sanitize input used as part of dynamic XPath expressions used to query an XML database.
  • Using Slashes and URL Encoding Combined to Bypass Validation Logic
    This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
  • Embedding NULL Bytes
    An attacker embeds one or more null bytes in input to the target software. This attack relies on the usage of a null-valued byte as a string terminator in many environments. The goal is for certain components of the target software to stop processing the input when it encounters the null byte(s).
  • String Format Overflow in syslog()
    This attack targets the format string vulnerabilities in the syslog() function. An attacker would typically inject malicious input in the format string parameter of the syslog function. This is a common problem, and many public vulnerabilities and associated exploits have been posted.
  • Using Escaped Slashes in Alternate Encoding
    This attack targets the use of the backslash in alternate encoding. An attacker can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the attacker tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.
  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • Fuzzing for garnering other adjacent user/sensitive data
    An attacker who is authorized to send queries to a target sends variants of expected queries in the hope that these modified queries might return information (directly or indirectly through error logs) beyond what the expected set of queries should provide. Many client applications use specific query templates when interacting with a server and often automatically fill in specific fields or attributes. For example, a client that queries an employee database might have templates such that the user only supplies the target's name and the template dictates the fields to be returned (location, position in the company, phone number, etc.). If the server does not verify that the query matches one of the expected templates, an attacker who is allowed to send normal queries could modify their query to try to return additional information. In the above example, additional information might include social security numbers or salaries. Fuzzing techniques involve sending random or malformed messages to a target and monitoring the target's response. In this particular attack, the fuzzing is applied to the format of the expected templates, creating variants that request additional information, exclude limiting clauses, or alter fields that identify the requester in order to subvert access controls. The attacker may not know the names of fields to request or how other modifications will affect the server response, but by attempting multiple plausible variants, they might eventually trigger a server response that divulges sensitive information. Other possible outcomes include server crashes and resource consumption if the unexpected queries cause the server to enter an unstable state or perform excessive computation.
  • Buffer Overflow via Parameter Expansion
    In this attack, the target software is given input that the attacker knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
  • URL Encoding
    This attack targets the encoding of the URL. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc. The attacker could also subvert the meaning of the URL string request by encoding the data being sent to the server through a GET request. For instance an attacker may subvert the meaning of parameters used in a SQL request and sent through the URL string (See Example section).
  • Using UTF-8 Encoding to Bypass Validation Logic
    This attack is a specific variation on leveraging alternate encodings to bypass validation logic. This attack leverages the possibility to encode potentially harmful input in UTF-8 and submit it to applications not expecting or effective at validating this encoding standard making input filtering difficult. UTF-8 (8-bit UCS/Unicode Transformation Format) is a variable-length character encoding for Unicode. Legal UTF-8 characters are one to four bytes long. However, early version of the UTF-8 specification got some entries wrong (in some cases it permitted overlong characters). UTF-8 encoders are supposed to use the "shortest possible" encoding, but naive decoders may accept encodings that are longer than necessary. According to the RFC 3629, a particularly subtle form of this attack can be carried out against a parser which performs security-critical validity checks against the UTF-8 encoded form of its input, but interprets certain illegal octet sequences as characters.
  • Buffer Overflow in Local Command-Line Utilities
    This attack targets command-line utilities available in a number of shells. An attacker can leverage a vulnerability found in a command-line utility to escalate privilege to root.
  • DOM-Based XSS
    This type of attack is a form of Cross-Site Scripting (XSS) where a malicious script is inserted into the client-side HTML being parsed by a web browser. Content served by a vulnerable web application includes script code used to manipulate the Document Object Model (DOM). This script code either does not properly validate input, or does not perform proper output encoding, thus creating an opportunity for an adversary to inject a malicious script launch a XSS attack. A key distinction between other XSS attacks and DOM-based attacks is that in other XSS attacks, the malicious script runs when the vulnerable web page is initially loaded, while a DOM-based attack executes sometime after the page loads. Another distinction of DOM-based attacks is that in some cases, the malicious script is never sent to the vulnerable web server at all. An attack like this is guaranteed to bypass any server-side filtering attempts to protect users.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:
  • Using Slashes in Alternate Encoding
    This attack targets the encoding of the Slash characters. An attacker would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the attacker many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.
  • LDAP Injection
    An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • XML Oversized Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an adversary to inject data that may have an adverse effect on the XML parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the XML parser, an adversary can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An adversary's goal is to leverage parser failure to his or her advantage. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing. However it is possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.231.1]. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
  • Accessing/Intercepting/Modifying HTTP Cookies
    This attack relies on the use of HTTP Cookies to store credentials, state information and other critical data on client systems. There are several different forms of this attack. The first form of this attack involves accessing HTTP Cookies to mine for potentially sensitive data contained therein. The second form involves intercepting this data as it is transmitted from client to server. This intercepted information is then used by the adversary to impersonate the remote user/session. The third form is when the cookie's content is modified by the adversary before it is sent back to the server. Here the adversary seeks to convince the target server to operate on this falsified information.
  • Input Data Manipulation
    An attacker exploits a weakness in input validation by controlling the format, structure, and composition of data to an input-processing interface. By supplying input of a non-standard or unexpected form an attacker can adversely impact the security of the target. For example, using a different character encoding might cause dangerous text to be treated as safe text. Alternatively, the attacker may use certain flags, such as file extensions, to make a target application believe that provided data should be handled using a certain interpreter when the data is not actually of the appropriate type. This can lead to bypassing protection mechanisms, forcing the target to use specific components for input processing, or otherwise causing the user's data to be handled differently than might otherwise be expected. This attack differs from Variable Manipulation in that Variable Manipulation attempts to subvert the target's processing through the value of the input while Input Data Manipulation seeks to control how the input is processed.
  • File Content Injection
    An attack of this type exploits the host's trust in executing remote content, including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the adversary and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The adversary exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the adversary knows the standard handling routines and can identify vulnerabilities and entry points, they can be exploited by otherwise seemingly normal content. Once the attack is executed, the adversary's program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
  • Fuzzing
    In this attack pattern, the adversary leverages fuzzing to try to identify weaknesses in the system. Fuzzing is a software security and functionality testing method that feeds randomly constructed input to the system and looks for an indication that a failure in response to that input has occurred. Fuzzing treats the system as a black box and is totally free from any preconceptions or assumptions about the system. Fuzzing can help an attacker discover certain assumptions made about user input in the system. Fuzzing gives an attacker a quick way of potentially uncovering some of these assumptions despite not necessarily knowing anything about the internals of the system. These assumptions can then be turned against the system by specially crafting user input that may allow an attacker to achieve his goals.
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
  • Buffer Overflow via Symbolic Links
    This type of attack leverages the use of symbolic links to cause buffer overflows. An attacker can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
  • AJAX Fingerprinting
    This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. In many XSS attacks the attacker must get a "hole in one" and successfully exploit the vulnerability on the victim side the first time, once the client is redirected the attacker has many chances to engage in follow on probes, but there is only one first chance. In a widely used web application this is not a major problem because 1 in a 1,000 is good enough in a widely used application. A common first step for an attacker is to footprint the environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Double Encoding
    The adversary utilizes a repeating of the encoding process for a set of characters (that is, character encoding a character encoding of a character) to obfuscate the payload of a particular request. This may allow the adversary to bypass filters that attempt to detect illegal characters or strings, such as those that might be used in traversal or injection attacks. Filters may be able to catch illegal encoded strings, but may not catch doubly encoded strings. For example, a dot (.), often used in path traversal attacks and therefore often blocked by filters, could be URL encoded as %2E. However, many filters recognize this encoding and would still block the request. In a double encoding, the % in the above URL encoding would be encoded again as %25, resulting in %252E which some filters might not catch, but which could still be interpreted as a dot (.) by interpreters on the target.
  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Format String Injection
    An adversary includes formatting characters in a string input field on the target application. Most applications assume that users will provide static text and may respond unpredictably to the presence of formatting character. For example, in certain functions of the C programming languages such as printf, the formatting character %s will print the contents of a memory location expecting this location to identify a string and the formatting character %n prints the number of DWORD written in the memory. An adversary can use this to read or write to memory locations or files, or simply to manipulate the value of the resulting text in unexpected ways. Reading or writing memory may result in program crashes and writing memory could result in the execution of arbitrary code if the adversary can write to the program stack.
  • Flash Injection
    An attacker tricks a victim to execute malicious flash content that executes commands or makes flash calls specified by the attacker. One example of this attack is cross-site flashing, an attacker controlled parameter to a reference call loads from content specified by the attacker.
  • Exploiting Trust in Client
    An attack of this type exploits vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by communicating directly with the server where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • XML Nested Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an adversary to inject data that may have an adverse effect on the XML parser when it is being processed. By nesting XML data and causing this data to be continuously self-referential, an adversary can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization. An adversary's goal is to leverage parser failure to his or her advantage. In most cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.230.1]. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
  • XML Injection
    An attacker utilizes crafted XML user-controllable input to probe, attack, and inject data into the XML database, using techniques similar to SQL injection. The user-controllable input can allow for unauthorized viewing of data, bypassing authentication or the front-end application for direct XML database access, and possibly altering database information.
  • Leverage Alternate Encoding
    An adversary leverages the possibility to encode potentially harmful input or content used by applications such that the applications are ineffective at validating this encoding standard.
  • Using Leading 'Ghost' Character Sequences to Bypass Input Filters
    Some APIs will strip certain leading characters from a string of parameters. An adversary can intentionally introduce leading "ghost" characters (extra characters that don't affect the validity of the request at the API layer) that enable the input to pass the filters and therefore process the adversary's input. This occurs when the targeted API will accept input data in several syntactic forms and interpret it in the equivalent semantic way, while the filter does not take into account the full spectrum of the syntactic forms acceptable to the targeted API.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Cross-Site Scripting (XSS)
    An adversary embeds malicious scripts in content that will be served to web browsers. The goal of the attack is for the target software, the client-side browser, to execute the script with the users' privilege level. An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute code and scripts. Web browsers, for example, have some simple security controls in place, but if a remote attacker is allowed to execute scripts (through injecting them in to user-generated content like bulletin boards) then these controls may be bypassed. Further, these attacks are very difficult for an end user to detect.
  • User-Controlled Filename
    An attack of this type involves an adversary inserting malicious characters (such as a XSS redirection) into a filename, directly or indirectly that is then used by the target software to generate HTML text or other potentially executable content. Many websites rely on user-generated content and dynamically build resources like files, filenames, and URL links directly from user supplied data. In this attack pattern, the attacker uploads code that can execute in the client browser and/or redirect the client browser to a site that the attacker owns. All XSS attack payload variants can be used to pass and exploit these vulnerabilities.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
NONE NONE PARTIAL
cvss-vector via4 AV:N/AC:L/Au:N/C:N/I:N/A:P
Last major update 12-07-2022 - 17:42
Published 03-03-2021 - 09:15
Last modified 12-07-2022 - 17:42
Back to Top