CVE-2017-16642
published 2017-11-07CVE-2017-16642: In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of'…
PriorityP261high7.5CVSS 3.0
AVNACLPRNUINSUCHINAN
EXPLOIT
EPSS
26.37%
97.7th percentile
In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| canonical | ubuntu_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| php | php | < 5.6.32 | 5.6.32 |
| php | php | >= 7.0.0 < 7.0.25 | 7.0.25 |
| php | php | >= 7.1.0 < 7.1.11 | 7.1.11 |
| php5 | php5 | >= 0 < 5.5.9+dfsg-1ubuntu4.23 | 5.5.9+dfsg-1ubuntu4.23 |
Detection & IOCsextracted from sources · hover to see the quote
- →The vulnerability is triggered via wddx_deserialize() processing date strings containing 'front of' or 'back of' directives, causing a heap out-of-bounds read in timelib_meridian(). Monitor for calls to wddx_deserialize() with untrusted input containing these date directive strings. ↗
- →The crash occurs at parse_date.c:410 in timelib_meridian, called from scan() -> timelib_strtotime() -> php_parse_date() -> php_wddx_process_data(). Stack traces matching this call chain indicate exploitation attempts. ↗
- →Affected PHP versions are before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11. Detect vulnerable PHP instances by version fingerprinting. ↗
- →The exploit PoC uses a WDDX-formatted XML payload containing the date string 'frONt of 0 0' (case-insensitive). Inspect WDDX deserialization inputs for 'front of' or 'back of' date directive patterns. ↗
- ·The build configuration used in the PoC enables WDDX and AddressSanitizer; the vulnerability is reproducible without ASan but the crash output shown is ASan-instrumented. The --enable-wddx compile flag is required for the wddx_deserialize() attack vector. ↗
- ·Other vectors beyond wddx_deserialize() that call php_parse_date() on untrusted input are also affected, not just the WDDX extension. ↗
CVSS provenance
nvdv3.07.5HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv9.8CRITICAL
vendor_ubuntu9.8CRITICAL
vendor_redhat7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
PHP vulnerabilities
vendor_ubuntu·2018-02-12·CVSS 9.8
CVE-2017-12933 [CRITICAL] PHP vulnerabilities
Title: PHP vulnerabilities
Summary: Several security issues were fixed in PHP.
It was discovered that PHP incorrectly handled the PHAR 404 error page. A
remote attacker could possibly use this issue to conduct cross-site
scripting (XSS) attacks. (CVE-2018-5712)
It was discovered that PHP incorrectly handled memory when unserializing
certain data. A remote attacker could use this issue to cause PHP to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2017-12933)
It was discovered that PHP incorrectly handled 'front of' and 'back of'
date directives. A remote attacker could possibly use this issue to obtain
sensitive information. (CVE-2017-16642)
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
php: Out-of-bound read in timelib_meridian()
vendor_redhat·2017-11-07·CVSS 7.5
CVE-2017-16642 [HIGH] CWE-125 php: Out-of-bound read in timelib_meridian()
php: Out-of-bound read in timelib_meridian()
In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.
Package: php (Red Hat Enterprise Linux 5) - Will not fix
Package: php53 (Red Hat Enterprise Linux 5) - Will not fix
Package: php (Red Hat Enterprise Linux 6) - Will not fix
Package: php (Red Hat Enterprise Linux 7) - Will not fix
Package: rh-php56-php (Red Hat Software Collections) - Will not fix
GHSA
GHSA-3r8x-r93p-fr32: In PHP before 5
ghsa_unreviewed·2022-05-14·CVSS 7.5
CVE-2017-16642 [HIGH] CWE-125 GHSA-3r8x-r93p-fr32: In PHP before 5
In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.
OSV
php5 vulnerabilities
osv·2018-02-12·CVSS 9.8
CVE-2018-5712 [CRITICAL] php5 vulnerabilities
php5 vulnerabilities
It was discovered that PHP incorrectly handled the PHAR 404 error page. A
remote attacker could possibly use this issue to conduct cross-site
scripting (XSS) attacks. (CVE-2018-5712)
It was discovered that PHP incorrectly handled memory when unserializing
certain data. A remote attacker could use this issue to cause PHP to crash,
resulting in a denial of service, or possibly execute arbitrary code.
(CVE-2017-12933)
It was discovered that PHP incorrectly handled 'front of' and 'back of'
date directives. A remote attacker could possibly use this issue to obtain
sensitive information. (CVE-2017-16642)
OSV
CVE-2017-16642: In PHP before 5
osv·2017-11-07·CVSS 7.5
CVE-2017-16642 [HIGH] CVE-2017-16642: In PHP before 5
In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.
No detection rules found.
Bugzilla
CVE-2017-16642 php: Out-of-bound read in timelib_meridian() [fedora-all]
bugzilla·2017-11-10·CVSS 7.5
CVE-2017-16642 [HIGH] CVE-2017-16642 php: Out-of-bound read in timelib_meridian() [fedora-all]
CVE-2017-16642 php: Out-of-bound read in timelib_meridian() [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this issue affects multiple supported versions of F
Bugzilla
CVE-2017-16642 php: Out-of-bound read in timelib_meridian()
bugzilla·2017-11-10·CVSS 7.5
CVE-2017-16642 [HIGH] CVE-2017-16642 php: Out-of-bound read in timelib_meridian()
CVE-2017-16642 php: Out-of-bound read in timelib_meridian()
In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.
Upstream bug:
https://bugs.php.net/bug.php?id=75055
Upstream patch:
https://github.com/derickr/timelib/commit/aa9156006e88565e1f1a5f7cc088b18322d57536
https://github.com/php/php-src/commit/5c0455bf2c8cd3c25401407f158e820aa3b239e1
Discussion:
Created php tracking bugs for this issue:
Affects: fedora-all [bug 1512059]
---
http://php.net/ChangeLog-5.phphttp://php.net/ChangeLog-7.phphttp://www.securityfocus.com/bid/101745https://access.redhat.com/errata/RHSA-2018:1296https://access.redhat.com/errata/RHSA-2019:2519https://bugs.php.net/bug.php?id=75055https://github.com/derickr/timelib/commit/aa9156006e88565e1f1a5f7cc088b18322d57536https://github.com/php/php-src/commit/5c0455bf2c8cd3c25401407f158e820aa3b239e1https://security.netapp.com/advisory/ntap-20181123-0001/https://usn.ubuntu.com/3566-1/https://www.debian.org/security/2018/dsa-4080https://www.debian.org/security/2018/dsa-4081https://www.exploit-db.com/exploits/43133/http://php.net/ChangeLog-5.phphttp://php.net/ChangeLog-7.phphttp://www.securityfocus.com/bid/101745https://access.redhat.com/errata/RHSA-2018:1296https://access.redhat.com/errata/RHSA-2019:2519https://bugs.php.net/bug.php?id=75055https://github.com/derickr/timelib/commit/aa9156006e88565e1f1a5f7cc088b18322d57536https://github.com/php/php-src/commit/5c0455bf2c8cd3c25401407f158e820aa3b239e1https://security.netapp.com/advisory/ntap-20181123-0001/https://usn.ubuntu.com/3566-1/https://www.debian.org/security/2018/dsa-4080https://www.debian.org/security/2018/dsa-4081https://www.exploit-db.com/exploits/43133/
2017-11-07
Published