Drupal Theme System Template Local File Inclusion

high Nessus Plugin ID 35751

Synopsis

The remote web server contains a PHP application that is affected by a local file include vulnerability.

Description

The version of Drupal running on the remote web server fails to filter input to the 'template_file' argument of the 'theme_render_template' function before using it in 'includes/themes.inc' to include PHP code.
When Drupal is running on a Windows host, an unauthenticated attacker can exploit this vulnerability to view local files or possibly execute arbitrary PHP scripts with the permissions of the web server process.

Solution

Either apply the appropriate patch as described in the project's advisories above or upgrade to Drupal 6.10 / 5.16 or later.

See Also

http://www.nessus.org/u?fbad9862

https://www.securityfocus.com/archive/1/501297/30/0/threaded

https://www.drupal.org/node/383724

https://www.drupal.org/node/384024

Plugin Details

Severity: High

ID: 35751

File Name: drupal_theme_template_lfi.nasl

Version: 1.19

Type: remote

Family: CGI abuses

Published: 2/28/2009

Updated: 4/11/2022

Configuration: Enable thorough checks

Supported Sensors: Nessus

Risk Information

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.2

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

Vulnerability Information

CPE: cpe:/a:drupal:drupal

Required KB Items: www/PHP, installed_sw/Drupal

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2/25/2009

Vulnerability Publication Date: 2/25/2009

Reference Information

BID: 33910