Vulnerabilities > CVE-2004-1315 - Unspecified vulnerability in PHPbb Group PHPbb

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
phpbb-group
nessus
exploit available
metasploit

Summary

viewtopic.php in phpBB 2.x before 2.0.11 improperly URL decodes the highlight parameter when extracting words and phrases to highlight, which allows remote attackers to execute arbitrary PHP code by double-encoding the highlight value so that special characters are inserted into the result, which is then processed by PHP exec, as exploited by the Santy.A worm.

Exploit-Db

  • descriptionphpBB <= 2.0.10 Remote Command Execution Exploit. CVE-2004-1315. Webapps exploit for php platform
    idEDB-ID:647
    last seen2016-01-31
    modified2004-11-22
    published2004-11-22
    reporterRusH
    sourcehttps://www.exploit-db.com/download/647/
    titlephpBB <= 2.0.10 - Remote Command Execution Exploit
  • descriptionphpBB 2.0.x Viewtopic.PHP PHP Script Injection Vulnerability. CVE-2004-1315. Webapps exploit for php platform
    idEDB-ID:24274
    last seen2016-02-02
    modified2004-07-12
    published2004-07-12
    reportersasan hezarkhani
    sourcehttps://www.exploit-db.com/download/24274/
    titlephpBB 2.0.x Viewtopic.PHP PHP Script Injection Vulnerability
  • descriptionphpBB viewtopic.php Arbitrary Code Execution. CVE-2004-1315,CVE-2005-2086. Webapps exploit for php platform
    idEDB-ID:16890
    last seen2016-02-02
    modified2010-07-03
    published2010-07-03
    reportermetasploit
    sourcehttps://www.exploit-db.com/download/16890/
    titlephpBB viewtopic.php Arbitrary Code Execution

Metasploit

descriptionThis module exploits two arbitrary PHP code execution flaws in the phpBB forum system. The problem is that the 'highlight' parameter in the 'viewtopic.php' script is not verified properly and will allow an attacker to inject arbitrary code via preg_replace(). This vulnerability was introduced in revision 3076, and finally fixed in revision 5166. According to the "tags" within their tree, this corresponds to versions 2.0.4 through 2.0.15 (inclusive).
idMSF:EXPLOIT/UNIX/WEBAPP/PHPBB_HIGHLIGHT
last seen2020-06-01
modified2017-11-08
published2008-03-05
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/unix/webapp/phpbb_highlight.rb
titlephpBB viewtopic.php Arbitrary Code Execution

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_E3CF89F053DA11D992B7CEADD4AC2EDD.NASL
    descriptionThe ChangeLog for phpBB 2.0.11 states : Changes since 2.0.10 - Fixed vulnerability in highlighting code (very high severity, please update your installation as soon as possible) - Fixed unsetting global vars - Matt Kavanagh - Fixed XSS vulnerability in username handling - AnthraX101 - Fixed not confirmed sql injection in username handling - warmth - Added check for empty topic id in topic_review function - Added visual confirmation mod to code base Additionally, a US-CERT Technical Cyber Security Alert reports : phpBB contains an user input validation problem with regard to the parsing of the URL. An intruder can deface a phpBB website, execute arbitrary commands, or gain administrative privileges on a compromised bulletin board.
    last seen2020-06-01
    modified2020-06-02
    plugin id19146
    published2005-07-13
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19146
    titleFreeBSD : phpbb -- arbitrary command execution and other vulnerabilities (e3cf89f0-53da-11d9-92b7-ceadd4ac2edd)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(19146);
      script_version("1.21");
      script_cvs_date("Date: 2019/08/02 13:32:36");
    
      script_cve_id("CVE-2004-1315");
      script_xref(name:"CERT", value:"497400");
    
      script_name(english:"FreeBSD : phpbb -- arbitrary command execution and other vulnerabilities (e3cf89f0-53da-11d9-92b7-ceadd4ac2edd)");
      script_summary(english:"Checks for updated package in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote FreeBSD host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The ChangeLog for phpBB 2.0.11 states :
    
    Changes since 2.0.10
    
    - Fixed vulnerability in highlighting code (very high severity, please
    update your installation as soon as possible)
    
    - Fixed unsetting global vars - Matt Kavanagh
    
    - Fixed XSS vulnerability in username handling - AnthraX101
    
    - Fixed not confirmed sql injection in username handling - warmth
    
    - Added check for empty topic id in topic_review function
    
    - Added visual confirmation mod to code base
    
    Additionally, a US-CERT Technical Cyber Security Alert reports :
    
    phpBB contains an user input validation problem with regard to the
    parsing of the URL. An intruder can deface a phpBB website, execute
    arbitrary commands, or gain administrative privileges on a compromised
    bulletin board."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=74106"
      );
      # http://www.uscert.gov/cas/techalerts/TA04-356A.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6894b814"
      );
      # http://www.phpbb.com/support/documents.php?mode=changelog
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpbb.com/support/documents.php?mode=changelog"
      );
      # http://marc.theaimsgroup.com/?l=bugtraq&m=110029415208724
      script_set_attribute(
        attribute:"see_also",
        value:"https://marc.info/?l=bugtraq&m=110029415208724"
      );
      # http://marc.theaimsgroup.com/?l=bugtraq&m=110079436714518
      script_set_attribute(
        attribute:"see_also",
        value:"https://marc.info/?l=bugtraq&m=110079436714518"
      );
      # http://www.phpbb.com/phpBB/viewtopic.php?f=14&t=240636
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpbb.com/community/viewtopic.php?f=14&t=240636"
      );
      # https://vuxml.freebsd.org/freebsd/e3cf89f0-53da-11d9-92b7-ceadd4ac2edd.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?e54a29b4"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'phpBB viewtopic.php Arbitrary Code Execution');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:phpbb");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2004/11/18");
      script_set_attribute(attribute:"patch_publication_date", value:"2004/12/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/07/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"phpbb<2.0.11")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:pkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200411-32.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200411-32 (phpBB: Remote command execution) phpBB contains a vulnerability in the highlighting code and several vulnerabilities in the username handling code. Impact : An attacker can exploit the highlighting vulnerability to access the PHP exec() function without restriction, allowing them to run arbitrary commands with the rights of the web server user (for example the apache user). Furthermore, the username handling vulnerability might be abused to execute SQL statements on the phpBB database.
    last seen2020-06-01
    modified2020-06-02
    plugin id15826
    published2004-11-24
    reporterThis script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/15826
    titleGLSA-200411-32 : phpBB: Remote command execution
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200411-32.
    #
    # The advisory text is Copyright (C) 2001-2018 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(15826);
      script_version("1.17");
      script_cvs_date("Date: 2019/08/02 13:32:42");
    
      script_cve_id("CVE-2004-1315");
      script_xref(name:"GLSA", value:"200411-32");
    
      script_name(english:"GLSA-200411-32 : phpBB: Remote command execution");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200411-32
    (phpBB: Remote command execution)
    
        phpBB contains a vulnerability in the highlighting code and several
        vulnerabilities in the username handling code.
      
    Impact :
    
        An attacker can exploit the highlighting vulnerability to access the
        PHP exec() function without restriction, allowing them to run arbitrary
        commands with the rights of the web server user (for example the apache
        user). Furthermore, the username handling vulnerability might be abused
        to execute SQL statements on the phpBB database."
      );
      # http://www.phpbb.com/phpBB/viewtopic.php?t=240513
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpbb.com/community/viewtopic.php?t=240513"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200411-32"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All phpBB users should upgrade to the latest version to fix all known
        vulnerabilities:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=www-apps/phpbb-2.0.11'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      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_set_attribute(attribute:"metasploit_name", value:'phpBB viewtopic.php Arbitrary Code Execution');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:phpbb");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2004/11/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2004/11/24");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2004-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"www-apps/phpbb", unaffected:make_list("ge 2.0.11"), vulnerable:make_list("lt 2.0.10"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "phpBB");
    }
    
  • NASL familyCGI abuses
    NASL idPHPBB_LOGIN_FORM_SQL.NASL
    descriptionThe remote host is running phpBB. There is a flaw in the remote software that could allow anyone to inject arbitrary SQL commands in the login form. An attacker could exploit this flaw to bypass the authentication of the remote host or execute arbitrary SQL statements against the remote database. ESMARKCONANT is one of multiple Equation Group vulnerabilities and exploits disclosed on 2017/04/14 by a group known as the Shadow Brokers.
    last seen2020-06-01
    modified2020-06-02
    plugin id15780
    published2004-11-22
    reporterThis script is Copyright (C) 2004-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/15780
    titlephpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT)
  • NASL familyCGI abuses
    NASL idPHPBB_VIEWTOPIC_SCRIPT_INJECTION.NASL
    descriptionThe remote host is running a version of phpBB older than 2.0.11. It is reported that this version of phpBB is susceptible to a script injection vulnerability which may allow an attacker to execute arbitrary code on the remote host. In addition, phpBB has been reported to multiple SQL injections, although Nessus has not checked for them. ESMARKCONANT is one of multiple Equation Group vulnerabilities and exploits disclosed on 2017/04/14 by a group known as the Shadow Brokers.
    last seen2020-06-01
    modified2020-06-02
    plugin id16200
    published2005-01-18
    reporterThis script is Copyright (C) 2005-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/16200
    titlephpBB < 2.0.11 Multiple Vulnerabilities (ESMARKCONANT)

Packetstorm

Seebug

  • bulletinFamilyexploit
    descriptionBUGTRAQ ID: 39922 PHP-Nuke是一个广为流行的网站创建和管理工具,可使用很多数据库软件作为后端,如MySQL、PostgreSQL、mSQL、 Interbase、Sybase等。 PHP-Nuke没有正确地过滤提交给/modules/Journal/savenew.php页面的mood变量,以及提交给/modules /Your_Account/admin/index.php页面的chng_user变量。远程攻击者可以通过提交恶意查询请求执行SQL注入攻击,完全入侵数据库系统。 PHP-Nuke PHP-Nuke 8.1.35 PHP-Nuke PHP-Nuke 8.1 PHP-Nuke PHP-Nuke 7.0 厂商补丁: PHP-Nuke -------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://phpnuke.org/
    idSSV:19573
    last seen2017-11-19
    modified2010-05-08
    published2010-05-08
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-19573
    titlePHP-Nuke多个SQL注入漏洞
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:68531
    last seen2017-11-19
    modified2014-07-01
    published2014-07-01
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-68531
    titlePHP-Nuke 7.0/8.1/8.1.35 - Wormable Remote Code Execution
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:19556
    last seen2017-11-19
    modified2010-05-05
    published2010-05-05
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-19556
    titleWormable Remote Code Execution in PHP-Nuke 7.0/8.1/8.1.35