Vulnerabilities > CVE-2020-7065 - Out-of-bounds Write vulnerability in multiple products

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL

Summary

In PHP versions 7.3.x below 7.3.16 and 7.4.x below 7.4.4, 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.

Common Weakness Enumeration (CWE)

Nessus

  • 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 familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-4330-2.NASL
    descriptionUSN-4330-1 fixed vulnerabilities in PHP. This update provides the corresponding update for Ubuntu 20.04 LTS. Original advisory details : It was discovered that PHP incorrectly handled certain EXIF files. An attacker could possibly use this issue to access sensitive information or cause a crash. (CVE-2020-7064) It was discovered that PHP incorrectly handled certain UTF strings. An attacker could possibly use this issue to cause a crash or execute arbitrary code. (CVE-2020-7065) It was discovered that PHP incorrectly handled certain URLs. An attacker could possibly use this issue to expose sensitive information. (CVE-2020-7066). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-05-12
    modified2020-05-07
    plugin id136398
    published2020-05-07
    reporterUbuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136398
    titleUbuntu 20.04 : php7.4 vulnerabilities (USN-4330-2)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-4330-2. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(136398);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/11");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"USN", value:"4330-2");
    
      script_name(english:"Ubuntu 20.04 : php7.4 vulnerabilities (USN-4330-2)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "USN-4330-1 fixed vulnerabilities in PHP. This update provides the
    corresponding update for Ubuntu 20.04 LTS.
    
    Original advisory details :
    
    It was discovered that PHP incorrectly handled certain EXIF files. An
    attacker could possibly use this issue to access sensitive information
    or cause a crash. (CVE-2020-7064)
    
    It was discovered that PHP incorrectly handled certain UTF
    strings. An attacker could possibly use this issue to cause
    a crash or execute arbitrary code. (CVE-2020-7065)
    
    It was discovered that PHP incorrectly handled certain URLs.
    An attacker could possibly use this issue to expose
    sensitive information. (CVE-2020-7066).
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu 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://usn.ubuntu.com/4330-2/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      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:canonical:ubuntu_linux:libapache2-mod-php7.4");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.4-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.4-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.4-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.4-mbstring");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:20.04");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/06");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/07");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(20\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 20.04", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"20.04", pkgname:"libapache2-mod-php7.4", pkgver:"7.4.3-4ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-cgi", pkgver:"7.4.3-4ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-cli", pkgver:"7.4.3-4ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-fpm", pkgver:"7.4.3-4ubuntu1.1")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-mbstring", pkgver:"7.4.3-4ubuntu1.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libapache2-mod-php7.4 / php7.4-cgi / php7.4-cli / php7.4-fpm / etc");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-4330-1.NASL
    descriptionIt was discovered that PHP incorrectly handled certain file uploads. An attacker could possibly use this issue to cause a crash. (CVE-2020-7062) It was discovered that PHP incorrectly handled certain PHAR archive files. An attacker could possibly use this issue to access sensitive information. (CVE-2020-7063) It was discovered that PHP incorrectly handled certain EXIF files. An attacker could possibly use this issue to access sensitive information or cause a crash. (CVE-2020-7064) It was discovered that PHP incorrectly handled certain UTF strings. An attacker could possibly use this issue to cause a crash or execute arbitrary code. This issue only affected Ubuntu 19.10. (CVE-2020-7065) It was discovered that PHP incorrectly handled certain URLs. An attacker could possibly use this issue to expose sensitive information. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04 LTS and Ubuntu 19.10. (CVE-2020-7066). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-04-30
    modified2020-04-16
    plugin id135672
    published2020-04-16
    reporterUbuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/135672
    titleUbuntu 16.04 LTS / 18.04 LTS / 19.10 : php5, php7.0, php7.2, php7.3 vulnerabilities (USN-4330-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-4330-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(135672);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/24");
    
      script_cve_id("CVE-2020-7062", "CVE-2020-7063", "CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"USN", value:"4330-1");
    
      script_name(english:"Ubuntu 16.04 LTS / 18.04 LTS / 19.10 : php5, php7.0, php7.2, php7.3 vulnerabilities (USN-4330-1)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that PHP incorrectly handled certain file uploads.
    An attacker could possibly use this issue to cause a crash.
    (CVE-2020-7062)
    
    It was discovered that PHP incorrectly handled certain PHAR archive
    files. An attacker could possibly use this issue to access sensitive
    information. (CVE-2020-7063)
    
    It was discovered that PHP incorrectly handled certain EXIF files. An
    attacker could possibly use this issue to access sensitive information
    or cause a crash. (CVE-2020-7064)
    
    It was discovered that PHP incorrectly handled certain UTF strings. An
    attacker could possibly use this issue to cause a crash or execute
    arbitrary code. This issue only affected Ubuntu 19.10. (CVE-2020-7065)
    
    It was discovered that PHP incorrectly handled certain URLs. An
    attacker could possibly use this issue to expose sensitive
    information. This issue only affected Ubuntu 16.04 LTS, Ubuntu 18.04
    LTS and Ubuntu 19.10. (CVE-2020-7066).
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu 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://usn.ubuntu.com/4330-1/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      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:canonical:ubuntu_linux:libapache2-mod-php5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php7.0");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php7.2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php7.3");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php5-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php5-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php5-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.0-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.0-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.0-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.2-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.2-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.2-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.3-cgi");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.3-cli");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.3-fpm");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:php7.3-mbstring");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:14.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:16.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:18.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:19.10");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/02/27");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/04/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/04/16");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(12\.04|14\.04|16\.04|18\.04|19\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 12.04 / 14.04 / 16.04 / 18.04 / 19.10", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"16.04", pkgname:"libapache2-mod-php7.0", pkgver:"7.0.33-0ubuntu0.16.04.14")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-cgi", pkgver:"7.0.33-0ubuntu0.16.04.14")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-cli", pkgver:"7.0.33-0ubuntu0.16.04.14")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-fpm", pkgver:"7.0.33-0ubuntu0.16.04.14")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"libapache2-mod-php7.2", pkgver:"7.2.24-0ubuntu0.18.04.4")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2", pkgver:"7.2.24-0ubuntu0.18.04.4")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-cgi", pkgver:"7.2.24-0ubuntu0.18.04.4")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-cli", pkgver:"7.2.24-0ubuntu0.18.04.4")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-fpm", pkgver:"7.2.24-0ubuntu0.18.04.4")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"libapache2-mod-php7.3", pkgver:"7.3.11-0ubuntu0.19.10.4")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-cgi", pkgver:"7.3.11-0ubuntu0.19.10.4")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-cli", pkgver:"7.3.11-0ubuntu0.19.10.4")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-fpm", pkgver:"7.3.11-0ubuntu0.19.10.4")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-mbstring", pkgver:"7.3.11-0ubuntu0.19.10.4")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libapache2-mod-php5 / libapache2-mod-php7.0 / libapache2-mod-php7.2 / etc");
    }
    
  • NASL familyCGI abuses
    NASL idPHP_7_3_16.NASL
    descriptionAccording to its banner, the version of PHP running on the remote web server is 7.3.x prior to 7.3.16. It is, therefore, affected by the following vulnerabilities: - An out of bounds read resulting in the use of an uninitialized value in exif (CVE-2020-7064) - A stack buffer overflow in allows overwriting of a stack-allocated buffer with an overflown array from .rodata. (CVE-2020-7065) - get_headers() silently truncates anything after a null byte in the URL it uses. An unauthenticated, remote attacker can exploit this to leak sensitive information or cause the web server to unexpectedly process attacker-controlled data. (CVE-2020-7066) Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-04-30
    modified2020-03-27
    plugin id134944
    published2020-03-27
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134944
    titlePHP 7.3.x < 7.3.16 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(134944);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/24");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"IAVA", value:"2020-A-0117-S");
    
      script_name(english:"PHP 7.3.x < 7.3.16 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 banner, the version of PHP running on the remote web server is 7.3.x prior to 7.3.16. It is,
    therefore, affected by the following vulnerabilities:
    
      - An out of bounds read resulting in the use of an uninitialized value in exif (CVE-2020-7064)
    
      - A stack buffer overflow in allows overwriting of a stack-allocated buffer with an overflown array from 
        .rodata. (CVE-2020-7065)
    
      - get_headers() silently truncates anything after a null byte in the URL it uses. An unauthenticated, remote
        attacker can exploit this to leak sensitive information or cause the web server to unexpectedly process
        attacker-controlled data. (CVE-2020-7066)
        
    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.16");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 7.3.16 or later.");
      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:"cvss_score_source", value:"CVE-2020-7065");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/03/19");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/27");
    
      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');
    include('audit.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.16'} ];
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-202003-57.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-202003-57 (PHP: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in PHP. Please review the CVE identifiers referenced below for details. Impact : An attacker could possibly execute arbitrary shell commands, cause a Denial of Service condition or obtain sensitive information. Workaround : There is no known workaround at this time.
    last seen2020-04-30
    modified2020-03-27
    plugin id134965
    published2020-03-27
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134965
    titleGLSA-202003-57 : PHP: Multiple vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 202003-57.
    #
    # The advisory text is Copyright (C) 2001-2020 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(134965);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/24");
    
      script_cve_id("CVE-2018-19518", "CVE-2020-7059", "CVE-2020-7060", "CVE-2020-7061", "CVE-2020-7062", "CVE-2020-7063", "CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"GLSA", value:"202003-57");
    
      script_name(english:"GLSA-202003-57 : PHP: 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-202003-57
    (PHP: Multiple vulnerabilities)
    
        Multiple vulnerabilities have been discovered in PHP. Please review the
          CVE identifiers referenced below for details.
      
    Impact :
    
        An attacker could possibly execute arbitrary shell commands, cause a
          Denial of Service condition or obtain sensitive information.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/202003-57"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All PHP 7.2.x users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=dev-lang/php-7.2.29:7.2'
        All PHP 7.3.x users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=dev-lang/php-7.3.16:7.3'
        All PHP 7.4.x users should upgrade to the latest version:
          # emerge --sync
          # emerge --ask --oneshot --verbose '>=dev-lang/php-7.4.4:7.4'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:S/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-19518");
      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:'php imap_open Remote 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:php");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2018/11/25");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/27");
      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:"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:"dev-lang/php", unaffected:make_list("ge 7.2.29", "ge 7.3.16", "ge 7.4.4"), vulnerable:make_list("lt 7.2.29", "lt 7.3.16", "lt 7.4.4"))) 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, "PHP");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2020-CE5A2A7403.NASL
    description**PHP version 7.3.16** (19 Mar 2020) **Core:** - Fixed bug php#63206 (restore_error_handler does not restore previous errors mask). (Mark Plomer) **DOM:** - Fixed bug php#77569: (Write Access Violation in DomImplementation). (Nikita, cmb) - Fixed bug php#79271 (DOMDocumentType::$childNodes is NULL). (cmb) **Enchant:** - Fixed bug php#79311 (enchant_dict_suggest() fails on big endian architecture). (cmb) **EXIF:** - Fixed bug php#79282 (Use-of-uninitialized-value in exif). (**CVE-2020-7064*) (Nikita) **MBstring:** - Fixed bug php#79371 (mb_strtolower (UTF-32LE): stack-buffer-overflow at php_unicode_tolower_full). (**CVE-2020-7065**) (cmb) **MySQLi:** - Fixed bug php#64032 (mysqli reports different client_version). (cmb) **PCRE:** - Fixed bug php#79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) **PDO_ODBC:** - Fixed bug php#79038 (PDOStatement::nextRowset() leaks column values). (cmb) **Reflection:** - Fixed bug php#79062 (Property with heredoc default value returns false for getDocComment). (Nikita) **SQLite3:** - Fixed bug php#79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb) **Standard:** - Fixed bug php#79329 (get_headers() silently truncates after a null byte). (**CVE-2020-7066**) (cmb) - Fixed bug php#79254 (getenv() w/o arguments not showing changes). (cmb) - Fixed bug php#79265 (Improper injection of Host header when using fopen for http requests). (Miguel Xavier Penha Neto) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-04-04
    modified2020-03-27
    plugin id134962
    published2020-03-27
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134962
    titleFedora 30 : php (2020-ce5a2a7403)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory FEDORA-2020-ce5a2a7403.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(134962);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/03");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"FEDORA", value:"2020-ce5a2a7403");
    
      script_name(english:"Fedora 30 : php (2020-ce5a2a7403)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "**PHP version 7.3.16** (19 Mar 2020)
    
    **Core:**
    
      - Fixed bug php#63206 (restore_error_handler does not
        restore previous errors mask). (Mark Plomer)
    
    **DOM:**
    
      - Fixed bug php#77569: (Write Access Violation in
        DomImplementation). (Nikita, cmb)
    
      - Fixed bug php#79271 (DOMDocumentType::$childNodes is
        NULL). (cmb)
    
    **Enchant:**
    
      - Fixed bug php#79311 (enchant_dict_suggest() fails on big
        endian architecture). (cmb)
    
    **EXIF:**
    
      - Fixed bug php#79282 (Use-of-uninitialized-value in
        exif). (**CVE-2020-7064*) (Nikita)
    
    **MBstring:**
    
      - Fixed bug php#79371 (mb_strtolower (UTF-32LE):
        stack-buffer-overflow at php_unicode_tolower_full).
        (**CVE-2020-7065**) (cmb)
    
    **MySQLi:**
    
      - Fixed bug php#64032 (mysqli reports different
        client_version). (cmb)
    
    **PCRE:**
    
      - Fixed bug php#79188 (Memory corruption in
        preg_replace/preg_replace_callback and unicode).
        (Nikita)
    
    **PDO_ODBC:**
    
      - Fixed bug php#79038 (PDOStatement::nextRowset() leaks
        column values). (cmb)
    
    **Reflection:**
    
      - Fixed bug php#79062 (Property with heredoc default value
        returns false for getDocComment). (Nikita)
    
    **SQLite3:**
    
      - Fixed bug php#79294 (::columnType() may fail after
        SQLite3Stmt::reset()). (cmb)
    
    **Standard:**
    
      - Fixed bug php#79329 (get_headers() silently truncates
        after a null byte). (**CVE-2020-7066**) (cmb)
    
      - Fixed bug php#79254 (getenv() w/o arguments not showing
        changes). (cmb)
    
      - Fixed bug php#79265 (Improper injection of Host header
        when using fopen for http requests). (Miguel Xavier
        Penha Neto)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora update system website.
    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://bodhi.fedoraproject.org/updates/FEDORA-2020-ce5a2a7403"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected php package.");
      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:"cvss_score_source", value:"CVE-2020-7065");
      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:fedoraproject:fedora:php");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:30");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/27");
      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:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/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/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! preg(pattern:"^30([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 30", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"FC30", reference:"php-7.3.16-1.fc30")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "php");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2020-0BF228857A.NASL
    description**PHP version 7.3.16** (19 Mar 2020) **Core:** - Fixed bug php#63206 (restore_error_handler does not restore previous errors mask). (Mark Plomer) **DOM:** - Fixed bug php#77569: (Write Access Violation in DomImplementation). (Nikita, cmb) - Fixed bug php#79271 (DOMDocumentType::$childNodes is NULL). (cmb) **Enchant:** - Fixed bug php#79311 (enchant_dict_suggest() fails on big endian architecture). (cmb) **EXIF:** - Fixed bug php#79282 (Use-of-uninitialized-value in exif). (**CVE-2020-7064*) (Nikita) **MBstring:** - Fixed bug php#79371 (mb_strtolower (UTF-32LE): stack-buffer-overflow at php_unicode_tolower_full). (**CVE-2020-7065**) (cmb) **MySQLi:** - Fixed bug php#64032 (mysqli reports different client_version). (cmb) **PCRE:** - Fixed bug php#79188 (Memory corruption in preg_replace/preg_replace_callback and unicode). (Nikita) **PDO_ODBC:** - Fixed bug php#79038 (PDOStatement::nextRowset() leaks column values). (cmb) **Reflection:** - Fixed bug php#79062 (Property with heredoc default value returns false for getDocComment). (Nikita) **SQLite3:** - Fixed bug php#79294 (::columnType() may fail after SQLite3Stmt::reset()). (cmb) **Standard:** - Fixed bug php#79329 (get_headers() silently truncates after a null byte). (**CVE-2020-7066**) (cmb) - Fixed bug php#79254 (getenv() w/o arguments not showing changes). (cmb) - Fixed bug php#79265 (Improper injection of Host header when using fopen for http requests). (Miguel Xavier Penha Neto) Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-04-04
    modified2020-03-26
    plugin id134919
    published2020-03-26
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134919
    titleFedora 31 : php (2020-0bf228857a)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory FEDORA-2020-0bf228857a.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(134919);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/03");
    
      script_cve_id("CVE-2020-7064", "CVE-2020-7065", "CVE-2020-7066");
      script_xref(name:"FEDORA", value:"2020-0bf228857a");
    
      script_name(english:"Fedora 31 : php (2020-0bf228857a)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "**PHP version 7.3.16** (19 Mar 2020)
    
    **Core:**
    
      - Fixed bug php#63206 (restore_error_handler does not
        restore previous errors mask). (Mark Plomer)
    
    **DOM:**
    
      - Fixed bug php#77569: (Write Access Violation in
        DomImplementation). (Nikita, cmb)
    
      - Fixed bug php#79271 (DOMDocumentType::$childNodes is
        NULL). (cmb)
    
    **Enchant:**
    
      - Fixed bug php#79311 (enchant_dict_suggest() fails on big
        endian architecture). (cmb)
    
    **EXIF:**
    
      - Fixed bug php#79282 (Use-of-uninitialized-value in
        exif). (**CVE-2020-7064*) (Nikita)
    
    **MBstring:**
    
      - Fixed bug php#79371 (mb_strtolower (UTF-32LE):
        stack-buffer-overflow at php_unicode_tolower_full).
        (**CVE-2020-7065**) (cmb)
    
    **MySQLi:**
    
      - Fixed bug php#64032 (mysqli reports different
        client_version). (cmb)
    
    **PCRE:**
    
      - Fixed bug php#79188 (Memory corruption in
        preg_replace/preg_replace_callback and unicode).
        (Nikita)
    
    **PDO_ODBC:**
    
      - Fixed bug php#79038 (PDOStatement::nextRowset() leaks
        column values). (cmb)
    
    **Reflection:**
    
      - Fixed bug php#79062 (Property with heredoc default value
        returns false for getDocComment). (Nikita)
    
    **SQLite3:**
    
      - Fixed bug php#79294 (::columnType() may fail after
        SQLite3Stmt::reset()). (cmb)
    
    **Standard:**
    
      - Fixed bug php#79329 (get_headers() silently truncates
        after a null byte). (**CVE-2020-7066**) (cmb)
    
      - Fixed bug php#79254 (getenv() w/o arguments not showing
        changes). (cmb)
    
      - Fixed bug php#79265 (Improper injection of Host header
        when using fopen for http requests). (Miguel Xavier
        Penha Neto)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Fedora update system website.
    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://bodhi.fedoraproject.org/updates/FEDORA-2020-0bf228857a"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected php package.");
      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:"cvss_score_source", value:"CVE-2020-7065");
      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:fedoraproject:fedora:php");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:31");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/04/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/26");
      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:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/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/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! preg(pattern:"^31([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 31", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"FC31", reference:"php-7.3.16-1.fc31")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "php");
    }