Vulnerabilities > CVE-2012-2041 - Code Injection vulnerability in Adobe Coldfusion 8.0/8.0.1/9.0

047910
CVSS 4.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
adobe
CWE-94
nessus

Summary

CRLF injection vulnerability in the Component Browser in Adobe ColdFusion 8.0 through 9.0.1 allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via unspecified vectors.

Vulnerable Configurations

Part Description Count
Application
Adobe
3

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Nessus

  • NASL familyWindows
    NASL idCOLDFUSION_WIN_APSB12-15.NASL
    descriptionThe version of Adobe ColdFusion running on the remote host is affected by an HTTP response splitting vulnerability. The coldfusion.filter.ComponentFilter class does not properly sanitize input used in the Location header of an HTTP response. A remote attacker could exploit this by tricking a user into making a malicious request, resulting in the injection of HTTP headers, modification of the HTTP response body, or splitting the HTTP response into multiple responses.
    last seen2020-06-01
    modified2020-06-02
    plugin id74190
    published2014-05-27
    reporterThis script is Copyright (C) 2014-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/74190
    titleAdobe ColdFusion HTTP Response Splitting (APSB12-15) (credentialed check)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(74190);
      script_version("1.5");
      script_cvs_date("Date: 2018/11/15 20:50:26");
    
      script_cve_id("CVE-2012-2041");
      script_bugtraq_id(53941);
    
      script_name(english:"Adobe ColdFusion HTTP Response Splitting (APSB12-15) (credentialed check)");
      script_summary(english:"Checks for hotfix file");
    
      script_set_attribute(attribute:"synopsis", value:
    "An application hosted on the remote web server is affected by an HTTP
    response splitting vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The version of Adobe ColdFusion running on the remote host is affected
    by an HTTP response splitting vulnerability.
    
    The coldfusion.filter.ComponentFilter class does not properly sanitize
    input used in the Location header of an HTTP response. A remote
    attacker could exploit this by tricking a user into making a malicious
    request, resulting in the injection of HTTP headers, modification of
    the HTTP response body, or splitting the HTTP response into multiple
    responses.");
      script_set_attribute(attribute:"see_also", value:"https://www.adobe.com/support/security/bulletins/apsb12-15.html");
      # https://helpx.adobe.com/coldfusion/kb/coldfusion-security-hotfix-apsb12-15.html
      script_set_attribute(attribute:"see_also",value:"http://www.nessus.org/u?b863d2a9");
      script_set_attribute(attribute:"solution", value:"Apply the hotfixes referenced in Adobe advisory APSB12-15.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/06/12");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/06/12");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/05/27");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:coldfusion");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2014-2018 Tenable Network Security, Inc.");
    
      script_dependencies("coldfusion_win_local_detect.nasl");
      script_require_keys("SMB/coldfusion/instance");
      script_require_ports(139, 445);
    
      exit(0);
    }
    
    include("coldfusion_win.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    
    versions = make_list('8.0.0', '8.0.1', '9.0.0', '9.0.1');
    instances = get_coldfusion_instances(versions); # this exits if it fails
    
    port = get_kb_item("SMB/transport");
    if (!port) port = 445;
    
    # Check the hotfixes and cumulative hotfixes installed for each
    # instance of ColdFusion.
    info = NULL;
    instance_info = make_list();
    
    foreach name (keys(instances))
    {
      info = NULL;
      ver = instances[name];
    
      if (ver == "8.0.0")
        info = check_jar_hotfix(name, "00006", 4, make_list("00001", "00002", "00003", "00004", "00005", "1875", "1878", "70523", "71471", "73122", "77218"));
      else if (ver == "8.0.1")
        info = check_jar_hotfix(name, "00006", 5, make_list("00001", "00002", "00003", "00004", "00005", "1875", "1878", "71471", "73122", "77218"));
      else if (ver == "9.0.0")
        info = check_jar_hotfix(name, "00006", 2, make_list("00001", "00002", "00003", "00004", "00005"));
      else if (ver == "9.0.1")
        info = check_jar_hotfix(name, "00005", 3, make_list("00001","00002","00003", "00004"));
    
      if (!isnull(info))
        instance_info = make_list(instance_info, info);
    }
    
    if (max_index(instance_info) == 0) exit(0, "No vulnerable instances of Adobe ColdFusion were detected.");
    
    set_kb_item(name:'www/0/XSS', value:TRUE);
    
    if (report_verbosity > 0)
    {
      report =
        '\n' + 'Nessus detected the following unpatched instances :' +
        '\n' + join(instance_info, sep:'\n') +
        '\n';
      security_warning(port:port, extra:report);
    }
    else security_warning(port);
    
  • NASL familyCGI abuses
    NASL idCOLDFUSION_APSB12-15.NASL
    descriptionThe version of Adobe ColdFusion running on the remote host is affected by an HTTP response splitting vulnerability. The coldfusion.filter.ComponentFilter class does not properly sanitize input used in the Location header of an HTTP response. A remote attacker can exploit this by tricking a user into making a malicious request, resulting in the injection of HTTP headers, modification of the HTTP response body, or splitting the HTTP response into multiple responses.
    last seen2020-06-01
    modified2020-06-02
    plugin id59715
    published2012-06-26
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/59715
    titleAdobe ColdFusion HTTP Response Splitting (APSB12-15)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(59715);
      script_version("1.16");
      script_cvs_date("Date: 2018/11/15 20:50:16");
    
      script_cve_id("CVE-2012-2041");
      script_bugtraq_id(53941);
    
      script_name(english:"Adobe ColdFusion HTTP Response Splitting (APSB12-15)");
      script_summary(english:"Attempts to inject an HTTP header into server response.");
    
      script_set_attribute(attribute:"synopsis", value:
    "An application hosted on the remote web server is affected by an HTTP
    response splitting vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The version of Adobe ColdFusion running on the remote host is affected
    by an HTTP response splitting vulnerability.
    
    The coldfusion.filter.ComponentFilter class does not properly sanitize
    input used in the Location header of an HTTP response. A remote
    attacker can exploit this by tricking a user into making a malicious
    request, resulting in the injection of HTTP headers, modification of
    the HTTP response body, or splitting the HTTP response into multiple
    responses.");
      script_set_attribute(attribute:"see_also", value:"https://www.adobe.com/support/security/bulletins/apsb12-15.html");
      # https://helpx.adobe.com/coldfusion/kb/coldfusion-security-hotfix-apsb12-15.html
      script_set_attribute(attribute:"see_also",value:"http://www.nessus.org/u?b863d2a9");
      script_set_attribute(attribute:"solution", value:"Apply the hotfixes referenced in Adobe advisory APSB12-15.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/06/12");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/06/12");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/06/26");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:coldfusion");
      script_set_attribute(attribute:"exploited_by_nessus", value:"true");
      script_end_attributes();
    
      script_category(ACT_ATTACK);
      script_family(english:"CGI abuses");
    
      script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");
    
      script_dependencies("coldfusion_detect.nasl");
      script_require_ports("Services/www", 80, 8500);
      script_require_keys("installed_sw/ColdFusion");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    include("install_func.inc");
    
    app = 'ColdFusion';
    get_install_count(app_name:app, exit_if_zero:TRUE);
    
    port = get_http_port(default:80);
    
    install = get_single_install(
      app_name : app,
      port     : port
    );
    
    dir = install['path'];
    ver = install['version'];
    install_url = build_url(port:port, qs:dir);
    
    vuln = FALSE;
    report2 = '';
    
    header_name = 'X-' + str_replace(string:SCRIPT_NAME, find:'.', replace:'-');
    time = unixtime();
    
    install_url = build_url(qs:dir, port:port);
    
    payload = '%0d%0a' + header_name + ':%20' + time;
    url = dir + '/adminapi/base.cfc/' + payload;
    
    res = http_send_recv3(method:'GET', item:url, port:port, exit_on_fail:TRUE);
    headers = parse_http_headers(status_line:res[0], headers:res[1]);
    if (isnull(headers)) audit(AUDIT_WEB_NO_SERVER_HEADER, port);
    
    header_val = headers[tolower(header_name)];
    
    if (header_val == time)
    {
      vuln = TRUE;
      report2 = '\n' + 'This produced the following response : \n\n';
    }
    
    if (!vuln)
    {
      # Check for patch which strips '%0d%0a' and ensure to only check affected
      # versions of CF unless paranoid
      if (
        ver =~ "^[8|9]\." ||
        (report_paranoia == 2 && ver == UNKNOWN_VER)
      )
      {
        payload = '%250d%250a' + header_name + ':' + time;
        url = '/adminapi/base.cfc/' + payload;
        expected_response = str_replace(string:url, find:'%25', replace:'%');
    
        res = http_send_recv3(method:'GET', item:dir+url, port:port, exit_on_fail:TRUE);
    
        headers = parse_http_headers(status_line:res[0], headers:res[1]);
        if (isnull(headers)) audit(AUDIT_WEB_NO_SERVER_HEADER, port);
    
        # Extract the HTTP header we attempted to inject
        location = headers['location'];
        if (expected_response >< location)
        {
          vuln = TRUE;
          report2 =
           '\n' + 'URL encoded CRLF characters were not stripped from the Location header' +
           '\n' + 'of the server response :\n\n';
        }
      }
    }
    
    if (!vuln) audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
    
    set_kb_item(name: 'www/'+port+'/XSS', value: TRUE);
    if (report_verbosity > 0)
    {
      report =
        '\n' + 'Nessus verified the vulnerability by requesting the URL :\n\n' +
        install_url + url +'\n' +
        report2 +
        res[0] + res[1];
      security_warning(port:port, extra:report);
    }
    else security_warning(port);
    
    

Seebug

bulletinFamilyexploit
descriptionCVE ID: CVE-2012-2041 Adobe ColdFusion是一个动态Web服务器。 Adobe ColdFusion 8.0至9.0.1版本没有正确过滤某些输入即返回给用户,在实现上存在CRLF注入漏洞,可被利用插入任意HTTP标头,并执行HTTP响应分离攻击。 0 Adobe ColdFusion 9.x Adobe ColdFusion 8.x 厂商补丁: Adobe ----- Adobe已经为此发布了一个安全公告(apsb12-15)以及相应补丁: apsb12-15:Security update: Hotfix available for ColdFusion 9.0.1 and earlier 链接:http://www.adobe.com/support/security/bulletins/apsb12-15.html
idSSV:60221
last seen2017-11-19
modified2012-06-16
published2012-06-16
reporterRoot
titleAdobe ColdFusion HTTP响应分离漏洞