Vulnerabilities > CVE-2011-4614 - Code Injection vulnerability in Typo3

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
typo3
CWE-94
nessus
exploit available

Summary

PHP remote file inclusion vulnerability in Classes/Controller/AbstractController.php in the workspaces system extension in TYPO3 4.5.x before 4.5.9, 4.6.x before 4.6.2, and development versions of 4.7 allows remote attackers to execute arbitrary PHP code via a URL in the BACK_PATH parameter.

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.

Exploit-Db

descriptionTypo3 4.5-4.7 - Remote Code Execution (RFI/LFI). CVE-2011-4614. Webapps exploit for php platform
idEDB-ID:18308
last seen2016-02-02
modified2012-01-04
published2012-01-04
reporterMaXe
sourcehttps://www.exploit-db.com/download/18308/
titleTypo3 4.5-4.7 - Remote Code Execution RFI/LFI

Nessus

  • NASL familyCGI abuses
    NASL idTYPO3_462_RFI.NASL
    descriptionThe version of TYPO3 installed on the remote host fails to sanitize user-supplied input to the
    last seen2020-06-01
    modified2020-06-02
    plugin id57394
    published2011-12-23
    reporterThis script is Copyright (C) 2011-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/57394
    titleTYPO3 'AbstractController.php' 'BACK_PATH' Parameter Remote File Inclusion
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(57394);
      script_version("1.11");
      script_cvs_date("Date: 2018/08/01 17:36:12");
    
      script_cve_id("CVE-2011-4614");
      script_bugtraq_id(51090);
      script_xref(name:"EDB-ID", value:"18308");
    
      script_name(english:"TYPO3 'AbstractController.php' 'BACK_PATH' Parameter Remote File Inclusion");
      script_summary(english:"Attempts to exploit a remote file inclusion vulnerability.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote web server contains a PHP script that is affected by a
    remote file inclusion vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The version of TYPO3 installed on the remote host fails to sanitize
    user-supplied input to the 'BACK_PATH' parameter of the
    'AbstractController.php' script before using it in a PHP
    'require_once()' call to include PHP code for execution.
    
    Provided that PHP's 'register_globals' setting is enabled, a remote,
    unauthenticated attacker can leverage this vulnerability to read
    arbitrary files or execute arbitrary PHP code on the affected host
    subject to the privileges under which the web server operates.");
      # http://typo3.org/teams/security/security-bulletins/typo3-core/typo3-core-sa-2011-004/
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f60d22ba");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to TYPO3 4.5.9 / 4.6.2 or see the TYPO3-CORE-SA-2011-004
    advisory for patch information.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_set_attribute(attribute:"d2_elliot_name", value:"TYPO3 4.5.8/4.6.1 RFI");
      script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2011/12/16");
      script_set_attribute(attribute:"patch_publication_date", value:"2011/12/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/12/23");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:typo3:typo3");
      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) 2011-2018 Tenable Network Security, Inc.");
    
      script_dependencies("typo3_detect.nasl");
      script_require_keys("installed_sw/TYPO3", "www/PHP");
      script_require_ports("Services/www", 80);
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    include("webapp_func.inc");
    
    app = "TYPO3";
    get_install_count(app_name:app, exit_if_zero:TRUE);
    
    port = get_http_port(default:80, php:TRUE);
    
    install = get_single_install(
      app_name : app,
      port     : port
    );
    dir = install['path'];
    install_url = build_url(qs:dir, port:port);
    
    exploit_req = "/typo3/sysext/workspaces/Classes/Controller/AbstractController.php?BACK_PATH=";
    exploit_dir_traversal = "../../../../";
    
    file_inclusion_checks = make_array();
    file_inclusion_checks['LICENSE.txt'] = "The TYPO3 licensing condition";
    file_inclusion_checks['close.html'] = "TYPO3 Script ID: typo3/close.html";
    
    exploitable = FALSE;
    verify_url = '';
    
    foreach file (keys(file_inclusion_checks))
    {
      url = dir + exploit_req + exploit_dir_traversal + file + "%00";
      res = http_send_recv3(method:"GET", item:url, port:port, exit_on_fail:TRUE);
      if(
        file + "): failed to open stream: No such file or directory" >< res[2] ||
        file + ") [function.require-once]: failed to open stream: No such file or directory" >< res[2] ||
        file + ") [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory" >< res[2] ||
    
        file + "): failed to open stream: Permission denied" >< res[2] ||
        file + ") [function.require-once]: failed to open stream: Permission denied" >< res[2] ||
        file + ") [<a href='function.require-once'>function.require-once</a>]: failed to open stream: Permission denied" >< res[2] ||
    
        file + "): failed to open stream: Operation not permitted" >< res[2] ||
        file + ") [function.require-once]: failed to open stream: Operation not permitted" >< res[2] ||
        file + ") [<a href='function.require-once'>function.require-once</a>]: failed to open stream: Operation not permitted" >< res[2] ||
    
        "Undefined index: BACK_PATH" >< res[2] ||
        file_inclusion_checks[file] >< res[2]
      )
      {
        # were we actually able to include a file?
        if(file_inclusion_checks[file] >< res[2])
        {
          verify_url = url;
          exploitable = TRUE;
          break;
        }
        verify_url = url;
      }
    }
    
    if (verify_url == '') audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);
    
    if (report_verbosity > 0)
    {
      if (exploitable)
        header = "Nessus was able to successfully exploit the vulnerability with\n" +
          "the following request";
      else
        header = "Nessus was able to verify the issue exists, but was unable to\n" +
          "exploit it with the following request (note: register_globals\n" +
          "must be enabled to exploit the vulnerability)";
    
      report = get_vuln_report(header:header, items:make_list(verify_url), port:port);
      security_warning(port:port, extra:report);
    }
    else security_warning(port);
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_3C957A3E297811E189B4001EC9578670.NASL
    descriptionThe typo3 security team reports : A crafted request to a vulnerable TYPO3 installation will allow an attacker to load PHP code from an external source and to execute it on the TYPO3 installation. This is caused by a PHP file, which is part of the workspaces system extension, that does not validate passed arguments.
    last seen2020-06-01
    modified2020-06-02
    plugin id57329
    published2011-12-19
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/57329
    titleFreeBSD : typo3 -- Remote Code Execution (3c957a3e-2978-11e1-89b4-001ec9578670)