Vulnerabilities > CVE-2019-11048 - Integer Overflow or Wraparound vulnerability in PHP

047910
CVSS 5.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
LOW
network
low complexity
php
CWE-190
nessus

Summary

In PHP versions 7.2.x below 7.2.31, 7.3.x below 7.3.18 and 7.4.x below 7.4.6, when HTTP file uploads are allowed, supplying overly long filenames or field names could lead PHP engine to try to allocate oversized memory storage, hit the memory limit and stop processing the request, without cleaning up temporary files created by upload request. This potentially could lead to accumulation of uncleaned temporary files exhausting the disk space on the target server.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Forced Integer Overflow
    This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.

Nessus

  • NASL familyCGI abuses
    NASL idPHP_7_4_6.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.31, 7.3.x prior to 7.3.18 or 7.4.x prior to 7.4.6. It is, therefore, affected by a denial of service (DoS) vulnerability in its HTTP file upload component due to a failure to clean up temporary files created during the file upload process. An unauthenticated, remote attacker can exploit this issue, by repeatedly submitting uploads with long file or field names, to exhaust disk space and cause a DoS condition. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-05-31
    modified2020-05-21
    plugin id136741
    published2020-05-21
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136741
    titlePHP 7.2.x < 7.2.31 / 7.3.x < 7.3.18, 7.4.x < 7.4.6 Denial of Service (DoS)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(136741);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/17");
    
      script_cve_id("CVE-2019-11048");
      script_xref(name:"IAVA", value:"2020-A-0221-S");
    
      script_name(english:"PHP 7.2.x < 7.2.31 / 7.3.x < 7.3.18, 7.4.x < 7.4.6 Denial of Service (DoS)");
    
      script_set_attribute(attribute:"synopsis", value:
    "The version of PHP running on the remote web server is affected by a denial of service 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.2.x prior to 
    7.2.31, 7.3.x prior to 7.3.18 or 7.4.x prior to 7.4.6. It is, therefore, affected by a denial of service (DoS) 
    vulnerability in its HTTP file upload component due to a failure to clean up temporary files created during the file 
    upload process. An unauthenticated, remote attacker can exploit this issue, by repeatedly submitting uploads with long 
    file or field names, to exhaust disk space and cause a DoS condition.
    
    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=78875
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a05c7b46");
      # https://bugs.php.net/bug.php?id=78876
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?504e39bf");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to PHP version 7.2.31, 7.3.18, 7.4.6 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/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:N/S:U/C:N/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-2019-11048");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/14");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/21");
    
      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.31'},
      {'min_version':'7.3.0alpha1', 'fixed_version':'7.3.18'},
      {'min_version':'7.4.0alpha1', 'fixed_version':'7.4.6'}
    ];
    
    vcf::check_version_and_report(
      app_info:app_info,
      constraints:constraints,
      severity:SECURITY_WARNING
    );
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2020-8838D072D5.NASL
    description**PHP version 7.3.18** (14 May 2020) **Core:** - Fixed bug php#78875 (Long filenames cause OOM and temp files are not cleaned). (**CVE-2019-11048**) (cmb) - Fixed bug php#78876 (Long variables in multipart/form-data cause OOM and temp files are not cleaned). (**CVE-2019-11048**) (cmb) - Fixed bug php#79434 (PHP 7.3 and PHP-7.4 crash with NULL pointer dereference on !CS constant). (Nikita) - Fixed bug php#79477 (casting object into array creates references). (Nikita) - Fixed bug php#79470 (PHP incompatible with 3rd party file system on demand). (cmb) - Fixed bug php#78784 (Unable to interact with files inside a VFS for Git repository). (cmb) **DOM:** - Fixed bug php#78221 (DOMNode::normalize() doesn
    last seen2020-05-31
    modified2020-05-22
    plugin id136779
    published2020-05-22
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136779
    titleFedora 31 : php (2020-8838d072d5)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory FEDORA-2020-8838d072d5.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(136779);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/17");
    
      script_cve_id("CVE-2019-11048");
      script_xref(name:"FEDORA", value:"2020-8838d072d5");
      script_xref(name:"IAVA", value:"2020-A-0221-S");
    
      script_name(english:"Fedora 31 : php (2020-8838d072d5)");
      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.18** (14 May 2020)
    
    **Core:**
    
      - Fixed bug php#78875 (Long filenames cause OOM and temp
        files are not cleaned). (**CVE-2019-11048**) (cmb)
    
      - Fixed bug php#78876 (Long variables in
        multipart/form-data cause OOM and temp files are not
        cleaned). (**CVE-2019-11048**) (cmb)
    
      - Fixed bug php#79434 (PHP 7.3 and PHP-7.4 crash with NULL
        pointer dereference on !CS constant). (Nikita)
    
      - Fixed bug php#79477 (casting object into array creates
        references). (Nikita)
    
      - Fixed bug php#79470 (PHP incompatible with 3rd party
        file system on demand). (cmb)
    
      - Fixed bug php#78784 (Unable to interact with files
        inside a VFS for Git repository). (cmb)
    
    **DOM:**
    
      - Fixed bug php#78221 (DOMNode::normalize() doesn't remove
        empty text nodes). (cmb)
    
    **FCGI:**
    
      - Fixed bug php#79491 (Search for .user.ini extends up to
        root dir). (cmb)
    
    **MBString:**
    
      - Fixed bug php#79441 (Segfault in mb_chr() if internal
        encoding is unsupported). (Girgias)
    
    **OpenSSL:**
    
      - Fixed bug php#79497 (stream_socket_client() throws an
        unknown error sometimes with <1s timeout). (Joe Cai)
    
    **Phar:**
    
      - Fix bug php#79503 (Memory leak on duplicate metadata).
        (cmb)
    
    **SimpleXML:**
    
      - Fixed bug php#79528 (Different object of the same xml
        between 7.4.5 and 7.4.4). (cmb)
    
    **Standard:**
    
      - Fixed bug php#79468 (SIGSEGV when closing stream handle
        with a stream filter appended). (dinosaur)
    
    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-8838d072d5"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected php package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/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:N/S:U/C:N/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:fedoraproject:fedora:php");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:31");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/22");
      script_set_attribute(attribute:"stig_severity", value:"I");
      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.18-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");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2020-9FA7F4E25C.NASL
    description**PHP version 7.3.18** (14 May 2020) **Core:** - Fixed bug php#78875 (Long filenames cause OOM and temp files are not cleaned). (**CVE-2019-11048**) (cmb) - Fixed bug php#78876 (Long variables in multipart/form-data cause OOM and temp files are not cleaned). (**CVE-2019-11048**) (cmb) - Fixed bug php#79434 (PHP 7.3 and PHP-7.4 crash with NULL pointer dereference on !CS constant). (Nikita) - Fixed bug php#79477 (casting object into array creates references). (Nikita) - Fixed bug php#79470 (PHP incompatible with 3rd party file system on demand). (cmb) - Fixed bug php#78784 (Unable to interact with files inside a VFS for Git repository). (cmb) **DOM:** - Fixed bug php#78221 (DOMNode::normalize() doesn
    last seen2020-05-31
    modified2020-05-22
    plugin id136780
    published2020-05-22
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/136780
    titleFedora 30 : php (2020-9fa7f4e25c)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory FEDORA-2020-9fa7f4e25c.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(136780);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/17");
    
      script_cve_id("CVE-2019-11048");
      script_xref(name:"FEDORA", value:"2020-9fa7f4e25c");
      script_xref(name:"IAVA", value:"2020-A-0221-S");
    
      script_name(english:"Fedora 30 : php (2020-9fa7f4e25c)");
      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.18** (14 May 2020)
    
    **Core:**
    
      - Fixed bug php#78875 (Long filenames cause OOM and temp
        files are not cleaned). (**CVE-2019-11048**) (cmb)
    
      - Fixed bug php#78876 (Long variables in
        multipart/form-data cause OOM and temp files are not
        cleaned). (**CVE-2019-11048**) (cmb)
    
      - Fixed bug php#79434 (PHP 7.3 and PHP-7.4 crash with NULL
        pointer dereference on !CS constant). (Nikita)
    
      - Fixed bug php#79477 (casting object into array creates
        references). (Nikita)
    
      - Fixed bug php#79470 (PHP incompatible with 3rd party
        file system on demand). (cmb)
    
      - Fixed bug php#78784 (Unable to interact with files
        inside a VFS for Git repository). (cmb)
    
    **DOM:**
    
      - Fixed bug php#78221 (DOMNode::normalize() doesn't remove
        empty text nodes). (cmb)
    
    **FCGI:**
    
      - Fixed bug php#79491 (Search for .user.ini extends up to
        root dir). (cmb)
    
    **MBString:**
    
      - Fixed bug php#79441 (Segfault in mb_chr() if internal
        encoding is unsupported). (Girgias)
    
    **OpenSSL:**
    
      - Fixed bug php#79497 (stream_socket_client() throws an
        unknown error sometimes with <1s timeout). (Joe Cai)
    
    **Phar:**
    
      - Fix bug php#79503 (Memory leak on duplicate metadata).
        (cmb)
    
    **SimpleXML:**
    
      - Fixed bug php#79528 (Different object of the same xml
        between 7.4.5 and 7.4.4). (cmb)
    
    **Standard:**
    
      - Fixed bug php#79468 (SIGSEGV when closing stream handle
        with a stream filter appended). (dinosaur)
    
    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-9fa7f4e25c"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected php package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/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:N/S:U/C:N/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:fedoraproject:fedora:php");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:30");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/22");
      script_set_attribute(attribute:"stig_severity", value:"I");
      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.18-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 familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-4375-1.NASL
    descriptionIt was discovered that PHP incorrectly handled certain files. An attacker could possibly use this issue to cause a denial of service. 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-06-12
    modified2020-05-28
    plugin id136944
    published2020-05-28
    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/136944
    titleUbuntu 16.04 LTS / 18.04 LTS / 19.10 / 20.04 : php5, php7.0, php7.2, php7.3, php7.4 vulnerability (USN-4375-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-4375-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(136944);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/17");
    
      script_cve_id("CVE-2019-11048");
      script_xref(name:"USN", value:"4375-1");
      script_xref(name:"IAVA", value:"2020-A-0221-S");
    
      script_name(english:"Ubuntu 16.04 LTS / 18.04 LTS / 19.10 / 20.04 : php5, php7.0, php7.2, php7.3, php7.4 vulnerability (USN-4375-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 files. An
    attacker could possibly use this issue to cause a denial of service.
    
    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/4375-1/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/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:N/S:U/C:N/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-2019-11048");
      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:libapache2-mod-php7.4");
      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.0-mbstring");
      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.2-mbstring");
      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:"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: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:"cpe", value:"cpe:/o:canonical:ubuntu_linux:20.04");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/05/27");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/28");
      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:"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|20\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 12.04 / 14.04 / 16.04 / 18.04 / 19.10 / 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:"16.04", pkgname:"libapache2-mod-php7.0", pkgver:"7.0.33-0ubuntu0.16.04.15")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-cgi", pkgver:"7.0.33-0ubuntu0.16.04.15")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-cli", pkgver:"7.0.33-0ubuntu0.16.04.15")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-fpm", pkgver:"7.0.33-0ubuntu0.16.04.15")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"php7.0-mbstring", pkgver:"7.0.33-0ubuntu0.16.04.15")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"libapache2-mod-php7.2", pkgver:"7.2.24-0ubuntu0.18.04.6")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-cgi", pkgver:"7.2.24-0ubuntu0.18.04.6")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-cli", pkgver:"7.2.24-0ubuntu0.18.04.6")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-fpm", pkgver:"7.2.24-0ubuntu0.18.04.6")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"php7.2-mbstring", pkgver:"7.2.24-0ubuntu0.18.04.6")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"libapache2-mod-php7.3", pkgver:"7.3.11-0ubuntu0.19.10.6")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-cgi", pkgver:"7.3.11-0ubuntu0.19.10.6")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-cli", pkgver:"7.3.11-0ubuntu0.19.10.6")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-fpm", pkgver:"7.3.11-0ubuntu0.19.10.6")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"php7.3-mbstring", pkgver:"7.3.11-0ubuntu0.19.10.6")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"libapache2-mod-php7.4", pkgver:"7.4.3-4ubuntu2.2")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-cgi", pkgver:"7.4.3-4ubuntu2.2")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-cli", pkgver:"7.4.3-4ubuntu2.2")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-fpm", pkgver:"7.4.3-4ubuntu2.2")) flag++;
    if (ubuntu_check(osver:"20.04", pkgname:"php7.4-mbstring", pkgver:"7.4.3-4ubuntu2.2")) 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");
    }
    

References