The function numberformat is vulnerable to a heap overflow issue when its second argument ($decpoints) is excessively large. The internal implementation of the function will cause a string to be created with an invalid length, which can then interact poorly with other functions. This affects all supported versions of HHVM (3.30.1 and 3.27.5 and below).
[
{
"id": "CVE-2018-6345-3ad5cf46",
"signature_version": "v1",
"deprecated": false,
"source": "https://github.com/facebook/hhvm/commit/190ffdf6c8b1ec443be202c7d69e63a7e3da25e3",
"target": {
"function": "string_number_format",
"file": "hphp/runtime/base/zend-string.cpp"
},
"digest": {
"length": 2073.0,
"function_hash": "95256358020707706149980498970347218152"
},
"signature_type": "Function"
},
{
"id": "CVE-2018-6345-65f7d33b",
"signature_version": "v1",
"deprecated": false,
"source": "https://github.com/facebook/hhvm/commit/190ffdf6c8b1ec443be202c7d69e63a7e3da25e3",
"target": {
"file": "hphp/runtime/base/zend-string.cpp"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"120448928775261171333816876248003924284",
"290830687089147216468533208881346715475",
"327620984512266839904410118598002568130",
"62121280727884383252454671421615411687",
"147159151230093668161659866324524529896",
"318187399451758695476112132875362274204",
"75308217060956838704125783808718071516",
"5372945335101579936913200712603807793"
]
},
"signature_type": "Line"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-6345.json"