PHP bis 4.4.9/5.5.6 Timestamp Converter openssl_x509_parse ASN1 Timestamp Pufferüberlauf
| CVSS Meta Temp Score | Aktueller Exploitpreis (≈) | CTI Interest Score |
|---|---|---|
| 9.0 | $0-$5k | 0.00 |
Zusammenfassung
In PHP bis 4.4.9/5.5.6 wurde eine kritische Schwachstelle ausgemacht. Es geht hierbei um die Funktion openssl_x509_parse der Komponente Timestamp Converter. Mittels dem Manipulieren durch ASN1 Timestamp kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden.
Die Identifikation der Schwachstelle wird mit CVE-2013-6420 vorgenommen. Ferner existiert ein Exploit.
Ein Upgrade der betroffenen Komponente wird empfohlen.
Details
In PHP bis 4.4.9/5.5.6 (Programming Language Software) wurde eine Schwachstelle entdeckt. Sie wurde als sehr kritisch eingestuft. Betroffen ist die Funktion openssl_x509_parse der Komponente Timestamp Converter. Mittels Manipulieren durch ASN1 Timestamp kann eine Pufferüberlauf-Schwachstelle ausgenutzt werden. CWE definiert das Problem als CWE-119. Das hat Auswirkungen auf Vertraulichkeit, Integrität und Verfügbarkeit. CVE fasst zusammen:
The asn1_time_to_time_t function in ext/openssl/openssl.c in PHP before 5.3.28, 5.4.x before 5.4.23, and 5.5.x before 5.5.7 does not properly parse (1) notBefore and (2) notAfter timestamps in X.509 certificates, which allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted certificate that is not properly handled by the openssl_x509_parse function.Im Advisory wird zusammengefasst:Other applications like Wordpress use openssl_x509_parse() to further verify SSL certificates whenever Wordpress connects to a HTTPS URL (in case ext/curl is not loaded which is the default for several linux distributions).Die Schwachstelle wurde am 13.12.2013 durch Stefan Esser (i0n1c) von SektionEins GmbH als PHP openssl_x509_parse() Memory Corruption Vulnerability in Form eines bestätigten Advisories (Website) an die Öffentlichkeit getragen. Das Advisory kann von sektioneins.de heruntergeladen werden. Die Veröffentlichung wurde in Zusammenarbeit mit dem Hersteller durchgeführt. Im Advisory ist nachzulesen:
RedHat Security tells php.net that they should commit the fix silently and add info about it only after release. They further tell php.net to tell us to not discuss the vulnerability in public prior to patches being available. [email protected] fixes the vulnerability openly and does not attempt to hide that the commit is a security fix as RedHat Security suggested. RedHat Security Announces that they now consider this vulnerability public and sends out their own patches with big announcement one day before php.net is ready to release their own fixes.Eine eindeutige Identifikation der Schwachstelle wird seit dem 04.11.2013 mit CVE-2013-6420 vorgenommen. Das Ausnutzen gilt als schwierig. Die Umsetzung des Angriffs kann dabei über das Netzwerk erfolgen. Um eine Ausnutzung durchzusetzen, muss keine spezifische Authentisierung umgesetzt werden. Es sind sowohl technische Details als auch ein öffentlicher Exploit zur Schwachstelle bekannt. Es muss davon ausgegangen werden, dass ein Exploit zur Zeit etwa USD $0-$5k kostet (Preisberechnung vom 30.12.2024). Der folgende Code generiert das Problem: static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */
{
/*
This is how the time string is formatted:
snprintf(p, sizeof(p), "%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
*/
time_t ret;
struct tm thetime;
char * strbuf;
char * thestr;
long gmadjust = 0;
if (timestr->length < 13) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "extension author too lazy to parse %s correctly", timestr->data);
return (time_t)-1;
} Das Advisory weist darauf hin:This problem can be triggered by x509 certificates that contain NUL bytes in their notBefore and notAfter timestamp fields and leads to a memory corruption that might result in arbitrary code execution. (…) Within the function openssl_x509_parse() the helper function asn1_time_to_time_t() is called two times (…).Ein öffentlicher Exploit wurde durch Stefan Esser (i0n1c) in x509 Certificate umgesetzt und sofort nach dem Advisory veröffentlicht. Unter sektioneins.de wird der Exploit bereitgestellt. Er wird als proof-of-concept gehandelt. Insgesamt 11 Tage schien es sich um eine nicht veröffentlichte Zero-Day Schwachstelle gehandelt zu haben. Während dieser Zeit erzielte er wohl etwa $25k-$100k auf dem Schwarzmarkt. Für den Vulnerability Scanner Nessus wurde am 23.12.2013 ein Plugin mit der ID 71574 (Amazon Linux AMI : php (ALAS-2013-262)) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann. Es wird der Family Amazon Linux Local Security Checks zugeordnet und im Kontext l ausgeführt. Der kommerzielle Vulnerability Scanner Qualys bietet das Plugin 43551 (Juniper JUNOS J-Web: Multiple Vulnerabilities (JSA10804)) zur Prüfung der Schwachstelle an.
Ein Upgrade vermag dieses Problem zu beheben. Eine neue Version kann von php.net bezogen werden. Das Erscheinen einer Gegenmassnahme geschah schon vor und nicht nach der Veröffentlichung der Schwachstelle. Die Entwickler haben offensichtlich vorab reagiert. Das Advisory stellt fest:
[email protected] pushes PHP updates to the PHP 5.3, PHP 5.4 and PHP 5.5 branches to the mirros as was previously agreed upon. Weiterführend können Angriffe durch TippingPoint mittels dem Filter 13619 erkannt werden. Unter anderem wird der Fehler auch in den Datenbanken von X-Force (89602), Exploit-DB (30395), Tenable (71574), SecurityFocus (BID 64018†) und Secunia (SA59652†) dokumentiert. Zusätzliche Informationen finden sich unter packetstormsecurity.com. Die Einträge VDB-5786, VDB-9523, VDB-11339 und VDB-66746 sind sehr ähnlich. Once again VulDB remains the best source for vulnerability data.
Produkt
Typ
Name
Version
Lizenz
Webseite
- Produkt: https://www.php.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Zuverlässigkeit: 🔍
CVSSv3
VulDB Meta Base Score: 10.0VulDB Meta Temp Score: 9.0
VulDB Base Score: 10.0
VulDB Temp Score: 9.0
VulDB Vector: 🔍
VulDB Zuverlässigkeit: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vektor | Komplexität | Authentisierung | Vertraulichkeit | Integrität | Verfügbarkeit |
|---|---|---|---|---|---|
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
| freischalten | freischalten | freischalten | freischalten | freischalten | freischalten |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Zuverlässigkeit: 🔍
NVD Base Score: 🔍
Exploiting
Klasse: PufferüberlaufCWE: CWE-119
CAPEC: 🔍
ATT&CK: 🔍
Physisch: Nein
Lokal: Nein
Remote: Ja
Verfügbarkeit: 🔍
Zugang: öffentlich
Status: Proof-of-Concept
Autor: Stefan Esser (i0n1c)
Programmiersprache: 🔍
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Preisentwicklung: 🔍
Aktuelle Preisschätzung: 🔍
| 0-Day | freischalten | freischalten | freischalten | freischalten |
|---|---|---|---|---|
| Heute | freischalten | freischalten | freischalten | freischalten |
Nessus ID: 71574
Nessus Name: Amazon Linux AMI : php (ALAS-2013-262)
Nessus Datei: 🔍
Nessus Risiko: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍
OpenVAS ID: 702816
OpenVAS Name: Debian Security Advisory DSA 2816-1 (php5 - several vulnerabilities
OpenVAS Datei: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Exploit-DB: 🔍
Threat Intelligence
Interesse: 🔍Aktive Akteure: 🔍
Aktive APT Gruppen: 🔍
Gegenmassnahmen
Empfehlung: UpgradeStatus: 🔍
Reaktionszeit: 🔍
0-Day Time: 🔍
Exploit Delay Time: 🔍
Upgrade: php.net
TippingPoint: 🔍
McAfee IPS: 🔍
McAfee IPS Version: 🔍
ISS Proventia IPS: 🔍
PaloAlto IPS: 🔍
Fortigate IPS: 🔍
Timeline
04.11.2013 🔍27.11.2013 🔍
01.12.2013 🔍
02.12.2013 🔍
09.12.2013 🔍
12.12.2013 🔍
13.12.2013 🔍
13.12.2013 🔍
16.12.2013 🔍
16.12.2013 🔍
17.12.2013 🔍
17.12.2013 🔍
23.12.2013 🔍
07.07.2014 🔍
30.12.2024 🔍
Quellen
Produkt: php.orgAdvisory: PHP openssl_x509_parse() Memory Corruption Vulnerability
Person: Stefan Esser (i0n1c)
Firma: SektionEins GmbH
Status: Bestätigt
Bestätigung: 🔍
Koordiniert: 🔍
CVE: CVE-2013-6420 (🔍)
GCVE (CVE): GCVE-0-2013-6420
GCVE (VulDB): GCVE-100-11512
OVAL: 🔍
IAVM: 🔍
X-Force: 89602
SecurityFocus: 64018 - PHP CVE-2013-6712 Remote Denial of Service Vulnerability
Secunia: 59652 - SUSE update for php5, Highly Critical
SecurityTracker: 1029472
Vulnerability Center: 42606 - PHP Remote Arbitrary Code Execution and Denial of Service due to a Flaw in the openssl_x509_parse Function, High
scip Labs: https://www.scip.ch/?labs.20161013
Diverses: 🔍
Siehe auch: 🔍
Eintrag
Erstellt: 16.12.2013 15:13Aktualisierung: 30.12.2024 16:08
Anpassungen: 16.12.2013 15:13 (112), 25.11.2018 10:02 (10), 04.06.2021 11:40 (2), 30.12.2024 16:08 (14)
Komplett: 🔍
Cache ID: 216:FBE:103
Bisher keine Kommentare. Sprachen: de + en.
Bitte loggen Sie sich ein, um kommentieren zu können.