Vulnerabilities > CVE-2008-1270 - Information Exposure vulnerability in Lighttpd

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
lighttpd
CWE-200
nessus
exploit available

Summary

mod_userdir in lighttpd 1.4.18 and earlier, when userdir.path is not set, uses a default of $HOME, which might allow remote attackers to read arbitrary files, as demonstrated by accessing the ~nobody directory.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' 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 placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Exploit-Db

descriptionLighttpd 1.4.x mod_userdir Information Disclosure Vulnerability. CVE-2008-1270. Remote exploit for linux platform
idEDB-ID:31396
last seen2016-02-03
modified2008-03-12
published2008-03-12
reporterjulien.cayzac
sourcehttps://www.exploit-db.com/download/31396/
titleLighttpd 1.4.x - mod_userdir Information Disclosure Vulnerability

Nessus

  • NASL familySuSE Local Security Checks
    NASL idSUSE_LIGHTTPD-5107.NASL
    description - Remote attackers were able to crash lighttpd by opening a large number of connections (CVE-2008-0983). - A bug in mod_cgi allowed remote attackers to read cgi source files (CVE-2008-1111). - A bug in mod_userdir allowed remote attackers to read arbitrary files (CVE-2008-1270).
    last seen2020-06-01
    modified2020-06-02
    plugin id31775
    published2008-04-04
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/31775
    titleopenSUSE 10 Security Update : lighttpd (lighttpd-5107)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update lighttpd-5107.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(31775);
      script_version ("1.10");
      script_cvs_date("Date: 2019/10/25 13:36:32");
    
      script_cve_id("CVE-2008-0983", "CVE-2008-1111", "CVE-2008-1270");
    
      script_name(english:"openSUSE 10 Security Update : lighttpd (lighttpd-5107)");
      script_summary(english:"Check for the lighttpd-5107 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "  - Remote attackers were able to crash lighttpd by opening
        a large number of connections (CVE-2008-0983).
    
      - A bug in mod_cgi allowed remote attackers to read cgi
        source files (CVE-2008-1111).
    
      - A bug in mod_userdir allowed remote attackers to read
        arbitrary files (CVE-2008-1270)."
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected lighttpd packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_cwe_id(200, 399);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_cml");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_magnet");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_mysql_vhost");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_rrdtool");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_trigger_b4_dl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:lighttpd-mod_webdav");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.3");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/03/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/04/04");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE10\.1|SUSE10\.2|SUSE10\.3)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "10.1 / 10.2 / 10.3", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-mod_cml-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-mod_mysql_vhost-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-mod_rrdtool-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-mod_trigger_b4_dl-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.1", reference:"lighttpd-mod_webdav-1.4.10-11.20") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_cml-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_magnet-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_mysql_vhost-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_rrdtool-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_trigger_b4_dl-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.2", reference:"lighttpd-mod_webdav-1.4.13-41.8") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_cml-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_magnet-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_mysql_vhost-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_rrdtool-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_trigger_b4_dl-1.4.18-1.3") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"lighttpd-mod_webdav-1.4.18-1.3") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "lighttpd / lighttpd-mod_cml / lighttpd-mod_mysql_vhost / etc");
    }
    
  • NASL familyWeb Servers
    NASL idLIGHTTPD_1_4_19.NASL
    descriptionAccording to its banner, the version of lighttpd running on the remote host is prior to 1.4.19. Therefore, it may be, affected by the following vulnerabilities : - lighttpd does not properly calculate the size of a file descriptor array, which allows remote attackers to cause a denial of service (crash) via a large number of connections, which triggers an out-of-bounds access. - lighttpd sends the source code of CGI scripts instead of a 500 error when a fork failure occurs, which might allow remote attackers to obtain sensitive information. - When userdir.path is not set, uses a default of $HOME, which might allow remote attackers to read arbitrary files. Note that Nessus has not tested for these issues but has instead relied only on the application
    last seen2020-06-01
    modified2020-06-02
    plugin id106624
    published2018-02-06
    reporterThis script is Copyright (C) 2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/106624
    titlelighttpd < 1.4.19 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(106624);
      script_version("$Revision: 1.2 $");
      script_cvs_date("$Date: 2018/02/07 15:00:36 $");
    
      script_cve_id(
        "CVE-2008-1270",
        "CVE-2008-1111",
        "CVE-2008-0983");
      script_bugtraq_id(
        28226,
        28100,
        27943);
    
      script_name(english:"lighttpd < 1.4.19 Multiple Vulnerabilities");
      script_summary(english:"Checks version in Server response header.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote web server is affected by multiple vulnerabilities");
      script_set_attribute(attribute:"description", value:
    "According to its banner, the version of lighttpd running on the remote
    host is prior to 1.4.19. Therefore, it may be, affected by the following
    vulnerabilities :
    
      - lighttpd does not properly calculate the size of a file descriptor
        array, which allows remote attackers to cause a denial of service
        (crash) via a large number of connections, which triggers an
        out-of-bounds access.
    
      - lighttpd sends the source code of CGI scripts instead of a 500
        error when a fork failure occurs, which might allow remote
        attackers to obtain sensitive information.
    
      - When userdir.path is not set, uses a default of $HOME, which
        might allow remote attackers to read arbitrary files.
    
    Note that Nessus has not tested for these issues but has instead
    relied only on the application's self-reported version number.");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to lighttpd version 1.4.19. Alternatively, apply the
    vendor-supplied patch.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(200, 399);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2008/03/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/02/06");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:lighttpd:lighttpd");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Web Servers");
      script_copyright(english:"This script is Copyright (C) 2018 Tenable Network Security, Inc.");
    
      script_dependencies("lighttpd_detect.nasl");
      script_require_keys("installed_sw/lighttpd", "Settings/ParanoidReport");
      script_require_ports("Services/www", 80);
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    include("vcf.inc");
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    appname = "lighttpd";
    get_install_count(app_name:appname, exit_if_zero:TRUE);
    port = get_http_port(default:80);
    app_info = vcf::get_app_info(app:appname, port:port, webapp:TRUE);
    
    vcf::check_granularity(app_info:app_info, sig_segments:3);
    
    constraints = [{"fixed_version":"1.4.19"}];
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1521.NASL
    descriptionJulien Cayzac discovered that under certain circumstances lighttpd, a fast webserver with minimal memory footprint, might allow the reading of arbitrary files from the system. This problem could only occur with a non-standard configuration.
    last seen2020-06-01
    modified2020-06-02
    plugin id31592
    published2008-03-17
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/31592
    titleDebian DSA-1521-1 : lighttpd - file disclosure
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-1521. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(31592);
      script_version("1.13");
      script_cvs_date("Date: 2019/08/02 13:32:21");
    
      script_cve_id("CVE-2008-1270");
      script_xref(name:"DSA", value:"1521");
    
      script_name(english:"Debian DSA-1521-1 : lighttpd - file disclosure");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Julien Cayzac discovered that under certain circumstances lighttpd, a
    fast webserver with minimal memory footprint, might allow the reading
    of arbitrary files from the system. This problem could only occur with
    a non-standard configuration."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2008/dsa-1521"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the lighttpd package.
    
    For the stable distribution (etch), this problem has been fixed in
    version 1.4.13-4etch6."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
      script_cwe_id(200);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:lighttpd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:4.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/03/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/03/17");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"4.0", prefix:"lighttpd", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-doc", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-mod-cml", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-mod-magnet", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-mod-mysql-vhost", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-mod-trigger-b4-dl", reference:"1.4.13-4etch6")) flag++;
    if (deb_check(release:"4.0", prefix:"lighttpd-mod-webdav", reference:"1.4.13-4etch6")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200804-08.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200804-08 (lighttpd: Multiple vulnerabilities) Julien Cayzax discovered that an insecure default setting exists in mod_userdir in lighttpd. When userdir.path is not set the default value used is $HOME. It should be noted that the
    last seen2020-06-01
    modified2020-06-02
    plugin id31955
    published2008-04-17
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/31955
    titleGLSA-200804-08 : lighttpd: Multiple vulnerabilities
    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 200804-08.
    #
    # The advisory text is Copyright (C) 2001-2015 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(31955);
      script_version("1.14");
      script_cvs_date("Date: 2019/08/02 13:32:44");
    
      script_cve_id("CVE-2008-1270", "CVE-2008-1531");
      script_xref(name:"GLSA", value:"200804-08");
    
      script_name(english:"GLSA-200804-08 : lighttpd: Multiple vulnerabilities");
      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-200804-08
    (lighttpd: Multiple vulnerabilities)
    
        Julien Cayzax discovered that an insecure default setting exists in
        mod_userdir in lighttpd. When userdir.path is not set the default value
        used is $HOME. It should be noted that the 'nobody' user's $HOME is '/'
        (CVE-2008-1270). An error also exists in the SSL connection code which
        can be triggered when a user prematurely terminates his connection
        (CVE-2008-1531).
      
    Impact :
    
        A remote attacker could exploit the first vulnerability to read
        arbitrary files. The second vulnerability can be exploited by a remote
        attacker to cause a Denial of Service by terminating a victim's SSL
        connection.
      
    Workaround :
    
        As a workaround for CVE-2008-1270 you can set userdir.path to a
        sensible value, e.g. 'public_html'."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200804-08"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All lighttpd users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=www-servers/lighttpd-1.4.19-r2'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
      script_cwe_id(200);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:lighttpd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/04/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/04/17");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 Tenable Network Security, Inc.");
      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-servers/lighttpd", unaffected:make_list("ge 1.4.19-r2"), vulnerable:make_list("lt 1.4.19-r2"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:qpkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "lighttpd");
    }