Vulnerabilities > CVE-2020-7067 - Out-of-bounds Read vulnerability in multiple products

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
php
tenable
oracle
debian
CWE-125
nessus

Summary

In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below 7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode() function can be made to access locations past the allocated memory, due to erroneously using signed numbers as array indexes.

Vulnerable Configurations

Part Description Count
Application
Php
133
Application
Tenable
8
Application
Oracle
10
OS
Debian
2

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Overread Buffers
    An adversary attacks a target by providing input that causes an application to read beyond the boundary of a defined buffer. This typically occurs when a value influencing where to start or stop reading is set to reflect positions outside of the valid memory location of the buffer. This type of attack may result in exposure of sensitive information, a system crash, or arbitrary code execution.

Nessus

  • NASL familyCGI abuses
    NASL idPHP_7_3_17.NASL
    descriptionAccording to its banner, the version of PHP running on the remote web server is 7.3.x prior to 7.3.17. It is, therefore, affected by an out-of-bounds read error in its url decoding component due to insufficient validation of user-supplied input. An unauthenticated, remote attacker can exploit this, by sending specially crafted requests, to cause a denial of service (DoS) condition or execution of arbitrary code. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-05-23
    modified2020-04-23
    plugin id135918
    published2020-04-23
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135918
    titlePHP 7.3.x < 7.3.17 Out of Bounds Read Vulnerability
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(135918);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/22");
    
      script_cve_id("CVE-2020-7067");
      script_xref(name:"IAVA", value:"2020-A-0169-S");
    
      script_name(english:"PHP 7.3.x < 7.3.17 Out of Bounds Read Vulnerability");
    
      script_set_attribute(attribute:"synopsis", value:
    "The version of PHP running on the remote web server is affected by 
      multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "According to its banner, the version of PHP running on the remote web server is 7.3.x prior to 7.3.17. It is,
    therefore, affected by an out-of-bounds read error in its url decoding component due to insufficient validation of 
    user-supplied input. An unauthenticated, remote attacker can exploit this, by sending specially crafted requests, to 
    cause a denial of service (DoS) condition or execution of arbitrary code.
    
    Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
    number.");
      script_set_attribute(attribute:"see_also", value:"https://www.php.net/ChangeLog-7.php#7.3.17");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 7.3.17 or later.");
      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:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-7067");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/04/23");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:php:php");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CGI abuses");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("php_version.nasl");
      script_require_keys("www/PHP", "installed_sw/PHP");
      script_require_ports("Services/www", 80);
    
      exit(0);
    }
    
    include('audit.inc');
    include('http.inc');
    include('vcf.inc');
    
    port = get_http_port(default:80, php:TRUE);
    app_info = vcf::get_app_info(app:'PHP', port:port, webapp:TRUE);
    
    backported = get_kb_item('www/php/' + port + '/' + app_info.version + '/backported');
    
    if ((report_paranoia < 2) && backported)
      audit(AUDIT_BACKPORT_SERVICE, port, 'PHP ' + app_info.version + ' install');
    
    constraints = [ {'min_version':'7.3.0alpha1', 'fixed_version':'7.3.17'} ];
    
    vcf::check_version_and_report(
      app_info:app_info,
      constraints:constraints,
      severity:SECURITY_WARNING
    );
    
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2020-1368.NASL
    descriptionIn PHP versions 7.2.x below 7.2.9, 7.3.x below 7.3.16 and 7.4.x below 7.4.34, while parsing EXIF data with exif_read_data() function, it is possible for malicious data to cause PHP to read one byte of uninitialized memory. This could potentially lead to information disclosure or crash. (CVE-2020-7064) In PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.34, while using mb_strtolower() function with UTF-32LE encoding, certain invalid strings could cause PHP to overwrite stack-allocated buffer. This could lead to memory corruption, crashes and potentially code execution. (CVE-2020-7065) In PHP versions 7.2.x below 7.2.29, 7.3.x below 7.3.16 and 7.4.x below 7.4.4, while using get_headers() with user-supplied URL, if the URL contains zero (\0) character, the URL will be silently truncated at it. This may cause some software to make incorrect assumptions about the target of the get_headers() and possibly send some information to a wrong server. (CVE-2020-7066) In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below 7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode() function can be made to access locations past the allocated memory, due to erroneously using signed numbers as array indexes. (CVE-2020-7067)
    last seen2020-05-21
    modified2020-05-15
    plugin id136629
    published2020-05-15
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136629
    titleAmazon Linux AMI : php73 (ALAS-2020-1368)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Amazon Linux AMI Security Advisory ALAS-2020-1368.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(136629);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/19");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066", "CVE-2020-7067");
      script_xref(name:"ALAS", value:"2020-1368");
    
      script_name(english:"Amazon Linux AMI : php73 (ALAS-2020-1368)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Amazon Linux AMI host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "In PHP versions 7.2.x below 7.2.9, 7.3.x below 7.3.16 and 7.4.x below
    7.4.34, while parsing EXIF data with exif_read_data() function, it is
    possible for malicious data to cause PHP to read one byte of
    uninitialized memory. This could potentially lead to information
    disclosure or crash. (CVE-2020-7064)
    
    In PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.34, while using
    mb_strtolower() function with UTF-32LE encoding, certain invalid
    strings could cause PHP to overwrite stack-allocated buffer. This
    could lead to memory corruption, crashes and potentially code
    execution. (CVE-2020-7065)
    
    In PHP versions 7.2.x below 7.2.29, 7.3.x below 7.3.16 and 7.4.x below
    7.4.4, while using get_headers() with user-supplied URL, if the URL
    contains zero (\0) character, the URL will be silently truncated at
    it. This may cause some software to make incorrect assumptions about
    the target of the get_headers() and possibly send some information to
    a wrong server. (CVE-2020-7066)
    
    In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below
    7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode()
    function can be made to access locations past the allocated memory,
    due to erroneously using signed numbers as array indexes.
    (CVE-2020-7067)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://alas.aws.amazon.com/ALAS-2020-1368.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Run 'yum update php73' to update your system."
      );
      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:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-bcmath");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-dba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-dbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-embedded");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-enchant");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-gd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-gmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-imap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-intl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-json");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-ldap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-mbstring");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-mysqlnd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-odbc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-opcache");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-pdo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-pdo-dblib");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-pgsql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-process");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-pspell");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-recode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-snmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-soap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-tidy");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-xml");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php73-xmlrpc");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/15");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Amazon Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/rpm-list");
    
      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/AmazonLinux/release");
    if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
    os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
    os_ver = os_ver[1];
    if (os_ver != "A")
    {
      if (os_ver == 'A') os_ver = 'AMI';
      audit(AUDIT_OS_NOT, "Amazon Linux AMI", "Amazon Linux " + os_ver);
    }
    
    if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (rpm_check(release:"ALA", reference:"php73-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-bcmath-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-cli-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-common-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-dba-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-dbg-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-debuginfo-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-devel-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-embedded-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-enchant-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-fpm-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-gd-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-gmp-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-imap-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-intl-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-json-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-ldap-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-mbstring-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-mysqlnd-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-odbc-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-opcache-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-pdo-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-pdo-dblib-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-pgsql-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-process-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-pspell-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-recode-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-snmp-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-soap-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-tidy-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-xml-7.3.17-1.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php73-xmlrpc-7.3.17-1.25.amzn1")) 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, "php73 / php73-bcmath / php73-cli / php73-common / php73-dba / etc");
    }
    
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2020-1367.NASL
    descriptionIn PHP versions 7.2.x below 7.2.9, 7.3.x below 7.3.16 and 7.4.x below 7.4.34, while parsing EXIF data with exif_read_data() function, it is possible for malicious data to cause PHP to read one byte of uninitialized memory. This could potentially lead to information disclosure or crash. (CVE-2020-7064) In PHP versions 7.2.x below 7.2.29, 7.3.x below 7.3.16 and 7.4.x below 7.4.4, while using get_headers() with user-supplied URL, if the URL contains zero (\0) character, the URL will be silently truncated at it. This may cause some software to make incorrect assumptions about the target of the get_headers() and possibly send some information to a wrong server. (CVE-2020-7066) In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below 7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode() function can be made to access locations past the allocated memory, due to erroneously using signed numbers as array indexes. (CVE-2020-7067)
    last seen2020-05-21
    modified2020-05-15
    plugin id136628
    published2020-05-15
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136628
    titleAmazon Linux AMI : php72 (ALAS-2020-1367)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Amazon Linux AMI Security Advisory ALAS-2020-1367.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(136628);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/19");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7066", "CVE-2020-7067");
      script_xref(name:"ALAS", value:"2020-1367");
    
      script_name(english:"Amazon Linux AMI : php72 (ALAS-2020-1367)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Amazon Linux AMI host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "In PHP versions 7.2.x below 7.2.9, 7.3.x below 7.3.16 and 7.4.x below
    7.4.34, while parsing EXIF data with exif_read_data() function, it is
    possible for malicious data to cause PHP to read one byte of
    uninitialized memory. This could potentially lead to information
    disclosure or crash. (CVE-2020-7064)
    
    In PHP versions 7.2.x below 7.2.29, 7.3.x below 7.3.16 and 7.4.x below
    7.4.4, while using get_headers() with user-supplied URL, if the URL
    contains zero (\0) character, the URL will be silently truncated at
    it. This may cause some software to make incorrect assumptions about
    the target of the get_headers() and possibly send some information to
    a wrong server. (CVE-2020-7066)
    
    In PHP versions 7.2.x below 7.2.30, 7.3.x below 7.3.17 and 7.4.x below
    7.4.5, if PHP is compiled with EBCDIC support (uncommon), urldecode()
    function can be made to access locations past the allocated memory,
    due to erroneously using signed numbers as array indexes.
    (CVE-2020-7067)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://alas.aws.amazon.com/ALAS-2020-1367.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Run 'yum update php72' to update your system."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-7064");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-bcmath");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-dba");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-dbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-embedded");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-enchant");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-gd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-gmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-imap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-intl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-json");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-ldap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-mbstring");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-mysqlnd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-odbc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-opcache");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-pdo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-pdo-dblib");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-pgsql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-process");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-pspell");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-recode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-snmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-soap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-tidy");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-xml");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:php72-xmlrpc");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/15");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Amazon Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/rpm-list");
    
      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/AmazonLinux/release");
    if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
    os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
    os_ver = os_ver[1];
    if (os_ver != "A")
    {
      if (os_ver == 'A') os_ver = 'AMI';
      audit(AUDIT_OS_NOT, "Amazon Linux AMI", "Amazon Linux " + os_ver);
    }
    
    if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (rpm_check(release:"ALA", reference:"php72-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-bcmath-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-cli-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-common-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-dba-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-dbg-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-debuginfo-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-devel-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-embedded-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-enchant-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-fpm-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-gd-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-gmp-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-imap-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-intl-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-json-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-ldap-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-mbstring-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-mysqlnd-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-odbc-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-opcache-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-pdo-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-pdo-dblib-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-pgsql-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-process-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-pspell-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-recode-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-snmp-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-soap-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-tidy-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-xml-7.2.30-1.22.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"php72-xmlrpc-7.2.30-1.22.amzn1")) 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, "php72 / php72-bcmath / php72-cli / php72-common / php72-dba / etc");
    }
    
  • NASL familyCGI abuses
    NASL idPHP_7_2_30.NASL
    descriptionAccording to its self-reported version number, the version of PHP running on the remote web server is 7.2.x prior to 7.2.30. It is, therefore, affected by multiple vulnerabilities: - An out-of-bounds read error exists in urldecode() due to improper data validation checks. An attacker can exploit this, by inserting negative hex values to leak values that are found in the memory before the array. - A NULL byte injection vulnerability exists in shell_exec() and the backtick operator due to improper data sanitization. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-05-23
    modified2020-04-23
    plugin id135926
    published2020-04-23
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135926
    titlePHP 7.2.x < 7.2.30 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(135926);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/22");
    
      script_cve_id("CVE-2020-7067");
      script_xref(name:"IAVA", value:"2020-A-0169-S");
    
      script_name(english:"PHP 7.2.x < 7.2.30 Multiple Vulnerabilities");
    
      script_set_attribute(attribute:"synopsis", value:
    "The version of PHP running on the remote web server is affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version number, the version of PHP running on the remote web server is 7.2.x prior to 
    7.2.30. It is, therefore, affected by multiple vulnerabilities:
    
      - An out-of-bounds read error exists in urldecode() due to improper data validation checks. An attacker can
      exploit this, by inserting negative hex values to leak values that are found in the memory before the array.
      
      - A NULL byte injection vulnerability exists in shell_exec() and the backtick operator due to improper data 
      sanitization.
    
    Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
    number.");
      # http://bugs.php.net/79330
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?95070b64");
      # http://bugs.php.net/79465
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?80dcf021");
      # http://php.net/ChangeLog-7.php#7.2.30
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?7c83177f");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 7.2.30 or later.");
      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:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-7067");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/04/23");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:php:php");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CGI abuses");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("php_version.nasl");
      script_require_keys("www/PHP", "installed_sw/PHP");
      script_require_ports("Services/www", 80);
    
      exit(0);
    }
    
    include('http.inc');
    include('vcf.inc');
    
    port = get_http_port(default:80, php:TRUE);
    app_info = vcf::get_app_info(app:'PHP', port:port, webapp:TRUE);
    
    backported = get_kb_item('www/php/' + port + '/' + app_info.version + '/backported');
    if ((report_paranoia < 2) && backported)
      audit(AUDIT_BACKPORT_SERVICE, port, 'PHP ' + app_info.version + ' install');
    
    constraints = [{'min_version':'7.2.0alpha1', 'fixed_version':'7.2.30'}];
    
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-2188.NASL
    descriptionThree issues have been found in php5, a server-side, HTML-embedded scripting language. CVE-2020-7064 A one byte out-of-bounds read, which could potentially lead to information disclosure or crash. CVE-2020-7066 An URL containing zero (\0) character will be truncated at it, which may cause some software to make incorrect assumptions and possibly send some information to a wrong server. CVE-2020-7067 Using a malformed url-encoded string an Out-of-Bounds read can occur. For Debian 8
    last seen2020-05-23
    modified2020-04-27
    plugin id135980
    published2020-04-27
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135980
    titleDebian DLA-2188-1 : php5 security update
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-2188-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(135980);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/22");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7066", "CVE-2020-7067");
      script_xref(name:"IAVA", value:"2020-A-0169-S");
    
      script_name(english:"Debian DLA-2188-1 : php5 security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Three issues have been found in php5, a server-side, HTML-embedded
    scripting language.
    
    CVE-2020-7064 A one byte out-of-bounds read, which could potentially
    lead to information disclosure or crash.
    
    CVE-2020-7066 An URL containing zero (\0) character will be truncated
    at it, which may cause some software to make incorrect assumptions and
    possibly send some information to a wrong server.
    
    CVE-2020-7067 Using a malformed url-encoded string an Out-of-Bounds
    read can occur.
    
    For Debian 8 'Jessie', these problems have been fixed in version
    5.6.40+dfsg-0+deb8u11.
    
    We recommend that you upgrade your php5 packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2020/04/msg00021.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/jessie/php5"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libapache2-mod-php5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libapache2-mod-php5filter");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libphp5-embed");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php-pear");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-curl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-dbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-enchant");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-gd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-gmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-imap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-interbase");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-intl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-ldap");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-mcrypt");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-mysql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-mysqlnd");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-odbc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-pgsql");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-phpdbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-pspell");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-readline");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-recode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-snmp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-sqlite");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-sybase");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-tidy");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-xmlrpc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:php5-xsl");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/04/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/04/27");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2020 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:"8.0", prefix:"libapache2-mod-php5", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"libapache2-mod-php5filter", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"libphp5-embed", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php-pear", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-cgi", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-cli", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-common", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-curl", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-dbg", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-dev", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-enchant", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-fpm", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-gd", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-gmp", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-imap", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-interbase", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-intl", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-ldap", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-mcrypt", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-mysql", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-mysqlnd", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-odbc", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-pgsql", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-phpdbg", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-pspell", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-readline", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-recode", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-snmp", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-sqlite", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-sybase", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-tidy", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-xmlrpc", reference:"5.6.40+dfsg-0+deb8u11")) flag++;
    if (deb_check(release:"8.0", prefix:"php5-xsl", reference:"5.6.40+dfsg-0+deb8u11")) 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 familyCGI abuses
    NASL idPHP_7_4_5.NASL
    descriptionAccording to its self-reported version number, the version of PHP running on the remote web server is 7.4.x prior to 7.4.5. It is, therefore, affected by an out-of-bounds read error in urldecode() due to improper data validation checks. An attacker can exploit this, by inserting negative hex values to leak values that are found in the memory before the array. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-05-23
    modified2020-04-24
    plugin id135969
    published2020-04-24
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135969
    titlePHP 7.4.x < 7.4.5 urldecode OOB Read
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(135969);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/22");
    
      script_cve_id("CVE-2020-7067");
      script_xref(name:"IAVA", value:"2020-A-0169-S");
    
      script_name(english:"PHP 7.4.x < 7.4.5 urldecode OOB Read");
    
      script_set_attribute(attribute:"synopsis", value:
    "The version of PHP running on the remote web server is affected by an out-of-bounds read vulnerability.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version number, the version of PHP running on the remote web server is 7.4.x prior to 
    7.4.5. It is, therefore, affected by an out-of-bounds read error in urldecode() due to improper data validation checks. 
    An attacker can exploit this, by inserting negative hex values to leak values that are found in the memory before the
    array.
    
    Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
    number.");
      # https://www.php.net/ChangeLog-7.php
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?948f4dd6");
      # https://bugs.php.net/bug.php?id=79465
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a7727efb");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 7.4.5 or later.");
      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:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-7067");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/04/24");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:php:php");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CGI abuses");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("php_version.nasl");
      script_require_keys("www/PHP", "installed_sw/PHP");
      script_require_ports("Services/www", 80);
    
      exit(0);
    }
    
    include('http.inc');
    include('vcf.inc');
    
    port = get_http_port(default:80, php:TRUE);
    app_info = vcf::get_app_info(app:'PHP', port:port, webapp:TRUE);
    
    backported = get_kb_item('www/php/' + port + '/' + app_info.version + '/backported');
    if ((report_paranoia < 2) && backported)
      audit(AUDIT_BACKPORT_SERVICE, port, 'PHP ' + app_info.version + ' install');
    
    constraints = [{'min_version':'7.4.0alpha1', 'fixed_version':'7.4.5'}];
    
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);