Fedora 31 : php (2019-4adc49a476) - Nessus

Critical   Plugin ID: 130411

This page contains detailed information about the Fedora 31 : php (2019-4adc49a476) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 130411
Name: Fedora 31 : php (2019-4adc49a476)
Filename: fedora_2019-4adc49a476.nasl
Vulnerability Published: 2019-10-28
This Plugin Published: 2019-10-31
Last Modification Time: 2022-03-29
Plugin Version: 1.10
Plugin Type: local
Plugin Family: Fedora Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list

Vulnerability Information


Severity: Critical
Vulnerability Published: 2019-10-28
Patch Published: 2019-10-31
CVE [?]: CVE-2019-11043
CPE [?]: cpe:/o:fedoraproject:fedora:31, p-cpe:/a:fedoraproject:fedora:php

Synopsis

The remote Fedora host is missing a security update.

Description

**PHP version 7.3.11** (24 Oct 2019)

**Core:**

- Fixed bug php#78535 (auto_detect_line_endings value not parsed as bool). (bugreportuser)

- Fixed bug php#78620 (Out of memory error). (cmb, Nikita)

**Exif :**

- Fixed bug php#78442 ('Illegal component' on exif_read_data since PHP7) (Kalle)

**FPM:**

- Fixed bug php#78599 (env_path_info underflow in fpm_main.c can lead to RCE). (**CVE-2019-11043**) (Jakub Zelenka)

- Fixed bug php#78413 (request_terminate_timeout does not take effect after fastcgi_finish_request). (Sergei Turchanov)

**MBString:**

- Fixed bug php#78579 (mb_decode_numericentity: args number inconsistency). (cmb)

- Fixed bug php#78609 (mb_check_encoding() no longer supports stringable objects). (cmb)

**MySQLi:**

- Fixed bug php#76809 (SSL settings aren't respected when persistent connections are used). (fabiomsouto)

**Mysqlnd:**

- Fixed bug php#78525 (Memory leak in pdo when reusing native prepared statements). (Nikita)

**PCRE:**

- Fixed bug php#78272 (calling preg_match() before pcntl_fork() will freeze child process). (Nikita)

**PDO_MySQL:**

- Fixed bug php#78623 (Regression caused by 'SP call yields additional empty result set'). (cmb)

**Session:**

- Fixed bug php#78624 (session_gc return value for user defined session handlers). (bshaffer)

**Standard:**

- Fixed bug php#76342 (file_get_contents waits twice specified timeout). (Thomas Calvet)

- Fixed bug php#78612 (strtr leaks memory when integer keys are used and the subject string shorter). (Nikita)

- Fixed bug php#76859 (stream_get_line skips data if used with data-generating filter). (kkopachev)

**Zip:**

- Fixed bug php#78641 (addGlob can modify given remove_path value). (cmb)

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.

Solution

Update the affected php package.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Fedora 31 : php (2019-4adc49a476) vulnerability:

  1. Metasploit: exploit/multi/http/php_fpm_rce
    [PHP-FPM Underflow RCE]
  2. Exploit-DB: exploits/php/remote/48182.rb
    [EDB-48182: PHP-FPM - Underflow Remote Code Execution (Metasploit)]
  3. Exploit-DB: exploits/php/webapps/47553.md
    [EDB-47553: PHP-FPM + Nginx - Remote Code Execution]
  4. GitHub: https://github.com/HxDDD/CVE-PoC
    [CVE-2019-11043]
  5. GitHub: https://github.com/LubinLew/WEB-CVE
    [CVE-2019-11043]
  6. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2019-11043]
  7. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2019-11043]
  8. GitHub: https://github.com/akamajoris/CVE-2019-11043-Docker
    [CVE-2019-11043]
  9. GitHub: https://github.com/alokaranasinghe/cve-2019-11043
    [CVE-2019-11043]
  10. GitHub: https://github.com/b0o/starred
    [CVE-2019-11043]
  11. GitHub: https://github.com/babebbu/TNI-CWC-GGEZ-Hosting
    [CVE-2019-11043]
  12. GitHub: https://github.com/bollwarm/tech-news
    [CVE-2019-11043]
  13. GitHub: https://github.com/fairyming/CVE-2019-11043
    [CVE-2019-11043]
  14. GitHub: https://github.com/hlong12042/CVE_2019_11043
    [CVE-2019-11043]
  15. GitHub: https://github.com/ianxtianxt/CVE-2019-11043
    [CVE-2019-11043]
  16. GitHub: https://github.com/izj007/wechat
    [CVE-2019-11043]
  17. GitHub: https://github.com/jas9reet/CVE-2019-11043
    [CVE-2019-11043: CVE-2019-11043 LAB]
  18. GitHub: https://github.com/jdecool/stars-feed
    [CVE-2019-11043]
  19. GitHub: https://github.com/jiangsir404/POC-S
    [CVE-2019-11043]
  20. GitHub: https://github.com/jptr218/php_hack
    [CVE-2019-11043]
  21. GitHub: https://github.com/lindemer/CVE-2019-11043
    [CVE-2019-11043: PHP-FPM Remote Command Execution Exploit]
  22. GitHub: https://github.com/linuxserver/docker-nextcloud
    [CVE-2019-11043]
  23. GitHub: https://github.com/lovechinacoco/https-github.com-mai-lang-chai-Middleware-Vulnerability-detection
    [CVE-2019-11043]
  24. GitHub: https://github.com/ltfafei/my_POC
    [CVE-2019-11043]
  25. GitHub: https://github.com/lucianonooijen/stargazed
    [CVE-2019-11043]
  26. GitHub: https://github.com/m0ver/drupal-installation-issues
    [CVE-2019-11043]
  27. GitHub: https://github.com/supercid/awesome-starred
    [CVE-2019-11043]
  28. GitHub: https://github.com/tdtc7/qps
    [CVE-2019-11043]
  29. GitHub: https://github.com/tinker-li/CVE-2019-11043
    [CVE-2019-11043]
  30. GitHub: https://github.com/tjkess/byol
    [CVE-2019-11043]
  31. GitHub: https://github.com/ugur-ercan/exploit-collection
    [CVE-2019-11043]
  32. GitHub: https://github.com/whoadmin/pocs
    [CVE-2019-11043]
  33. GitHub: https://github.com/zhengjim/loophole
    [CVE-2019-11043]
  34. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/47553.zip
    [EDB-47553]
  35. GitHub: https://github.com/0th3rs-Security-Team/CVE-2019-11043
    [CVE-2019-11043: CVE-2019-11043 PHP7.x RCE]
  36. GitHub: https://github.com/AleWong/PHP-FPM-Remote-Code-Execution-Vulnerability-CVE-2019-11043-
    [CVE-2019-11043: PHP-FPM Remote Code Execution Vulnerability (CVE-2019-11043) POC in Python]
  37. GitHub: https://github.com/B1gd0g/CVE-2019-11043
    [CVE-2019-11043]
  38. GitHub: https://github.com/corifeo/CVE-2019-11043
    [CVE-2019-11043: Quick and dirty PHP RCE proof of concept]
  39. GitHub: https://github.com/huowen/CVE-2019-11043
    [CVE-2019-11043: Python exp for CVE-2019-11043]
  40. GitHub: https://github.com/k8gege/CVE-2019-11043
    [CVE-2019-11043: Ladon POC Moudle CVE-2019-11043 (PHP-FPM + Ngnix)]
  41. GitHub: https://github.com/kriskhub/CVE-2019-11043
    [CVE-2019-11043: This repository provides a dockerized infrastructure and a python implementation of ...]
  42. GitHub: https://github.com/MRdoulestar/CVE-2019-11043
    [CVE-2019-11043: CVE-2019-11043 && PHP7.x && RCE EXP]
  43. GitHub: https://github.com/neex/phuip-fpizdam
    [CVE-2019-11043: Exploit for CVE-2019-11043]
  44. GitHub: https://github.com/shadow-horse/cve-2019-11043
    [CVE-2019-11043: CVE-2019-11043 PHP远程代码执行]
  45. GitHub: https://github.com/theMiddleBlue/CVE-2019-11043
    [CVE-2019-11043: (PoC) Python version of CVE-2019-11043 exploit by neex]
  46. GitHub: https://github.com/ypereirareis/docker-CVE-2019-11043
    [CVE-2019-11043: Docker image and commands to check CVE-2019-11043 vulnerability on nginx/php-fpm ...]
  47. GitHub: https://github.com/jas502n/CVE-2019-11043
    [CVE-2019-11043: Php-fpm+Nginx RCE]
  48. GitHub: https://github.com/moniik/CVE-2019-11043_env
    [CVE-2019-11043: Remote debug environment for CLion]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2019-11043
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the fedora_2019-4adc49a476.nasl nessus plugin source code. This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Fedora Security Advisory FEDORA-2019-4adc49a476.
#

include('deprecated_nasl_level.inc');
include("compat.inc");

if (description)
{
  script_id(130411);
  script_version("1.10");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/03/29");

  script_cve_id("CVE-2019-11043");
  script_xref(name:"FEDORA", value:"2019-4adc49a476");
  script_xref(name:"IAVA", value:"2019-A-0399-S");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/04/15");

  script_name(english:"Fedora 31 : php (2019-4adc49a476)");
  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.11** (24 Oct 2019)

**Core:**

  - Fixed bug php#78535 (auto_detect_line_endings value not
    parsed as bool). (bugreportuser)

  - Fixed bug php#78620 (Out of memory error). (cmb, Nikita)

**Exif :**

  - Fixed bug php#78442 ('Illegal component' on
    exif_read_data since PHP7) (Kalle)

**FPM:**

  - Fixed bug php#78599 (env_path_info underflow in
    fpm_main.c can lead to RCE). (**CVE-2019-11043**) (Jakub
    Zelenka)

  - Fixed bug php#78413 (request_terminate_timeout does not
    take effect after fastcgi_finish_request). (Sergei
    Turchanov)

**MBString:**

  - Fixed bug php#78579 (mb_decode_numericentity: args
    number inconsistency). (cmb)

  - Fixed bug php#78609 (mb_check_encoding() no longer
    supports stringable objects). (cmb)

**MySQLi:**

  - Fixed bug php#76809 (SSL settings aren't respected when
    persistent connections are used). (fabiomsouto)

**Mysqlnd:**

  - Fixed bug php#78525 (Memory leak in pdo when reusing
    native prepared statements). (Nikita)

**PCRE:**

  - Fixed bug php#78272 (calling preg_match() before
    pcntl_fork() will freeze child process). (Nikita)

**PDO_MySQL:**

  - Fixed bug php#78623 (Regression caused by 'SP call
    yields additional empty result set'). (cmb)

**Session:**

  - Fixed bug php#78624 (session_gc return value for user
    defined session handlers). (bshaffer)

**Standard:**

  - Fixed bug php#76342 (file_get_contents waits twice
    specified timeout). (Thomas Calvet)

  - Fixed bug php#78612 (strtr leaks memory when integer
    keys are used and the subject string shorter). (Nikita)

  - Fixed bug php#76859 (stream_get_line skips data if used
    with data-generating filter). (kkopachev)

**Zip:**

  - Fixed bug php#78641 (addGlob can modify given
    remove_path value). (cmb)

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-2019-4adc49a476"
  );
  script_set_attribute(attribute:"solution", value:"Update the affected php package.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/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:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-11043");
  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-FPM Underflow RCE');
  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:fedoraproject:fedora:php");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:31");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/10/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/10/31");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/10/31");
  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) 2019-2022 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.11-1.fc31")) flag++;


if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    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");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/fedora_2019-4adc49a476.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\fedora_2019-4adc49a476.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/fedora_2019-4adc49a476.nasl

Go back to menu.

How to Run


Here is how to run the Fedora 31 : php (2019-4adc49a476) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Fedora Local Security Checks plugin family.
  6. On the right side table select Fedora 31 : php (2019-4adc49a476) plugin ID 130411.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl fedora_2019-4adc49a476.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a fedora_2019-4adc49a476.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - fedora_2019-4adc49a476.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state fedora_2019-4adc49a476.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2019-A-0399-S
Fedora Security Update: See also: Similar and related Nessus plugins:
  • 130276 - PHP < 7.1.33 / 7.2.x < 7.2.24 / 7.3.x < 7.3.11 Remote Code Execution Vulnerability.
  • 130283 - Debian DLA-1970-1 : php5 security update
  • 130329 - GLSA-201910-01 : PHP: Arbitrary code execution
  • 130349 - Debian DSA-4552-1 : php7.0 - security update
  • 130350 - Debian DSA-4553-1 : php7.3 - security update
  • 130362 - Ubuntu 16.04 LTS / 18.04 LTS / 19.04 / 19.10 : PHP vulnerability (USN-4166-1)
  • 130390 - SUSE SLES12 Security Update : php7 (SUSE-SU-2019:2809-1)
  • 130421 - SUSE SLED15 / SLES15 Security Update : php7 (SUSE-SU-2019:2819-1)
  • 130442 - Oracle Linux 7 : php (ELSA-2019-3286)
  • 130445 - RHEL 7 : php (RHSA-2019:3286)
  • 130446 - RHEL 6 : php (RHSA-2019:3287)
  • 130447 - Scientific Linux Security Update : php on SL7.x x86_64 (20191031)
  • 130470 - Amazon Linux 2 : php (ALAS-2019-1344)
  • 130471 - Amazon Linux AMI : php71 / php72, php73, php56 (ALAS-2019-1315)
  • 130473 - CentOS 7 : php (CESA-2019:3286)
  • 130474 - CentOS 6 : php (CESA-2019:3287)
  • 130476 - Fedora 29 : php (2019-187ae3128d)
  • 130482 - Fedora 30 : php (2019-7bb07c3b02)
  • 130497 - Oracle Linux 6 : php (ELSA-2019-3287)
  • 130499 - Scientific Linux Security Update : php on SL6.x i386/x86_64 (20191031)
  • 130580 - openSUSE Security Update : php7 (openSUSE-2019-2441)
  • 130617 - FreeBSD : php -- env_path_info underflow in fpm_main.c can lead to RCE (6a7c2ab0-00dd-11ea-83ce-705a0f828759)
  • 130621 - SUSE SLES12 Security Update : php72 (SUSE-SU-2019:2909-1)
  • 130738 - RHEL 8 : php:7.2 (RHSA-2019:3735)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file fedora_2019-4adc49a476.nasl version 1.10. For more plugins, visit the Nessus Plugin Library.

Go back to menu.