{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-62495","id":"CVE-2025-62495","title":"Type confusion in string addition in QuickJS","description":"An integer overflow vulnerability exists in the QuickJS regular expression engine (libregexp) due to an inconsistent representation of the bytecode buffer size.\n\n  *  The regular expression bytecode is stored in a DynBuf structure, which correctly uses a $\\text{size}\\_\\text{t}$ (an unsigned type, typically 64-bit) for its size member.\n\n\n  *  However, several functions, such as re_emit_op_u32 and o","descriptionLong":"An integer overflow vulnerability exists in the QuickJS regular expression engine (libregexp) due to an inconsistent representation of the bytecode buffer size.\n\n  *  The regular expression bytecode is stored in a DynBuf structure, which correctly uses a $\\text{size}\\_\\text{t}$ (an unsigned type, typically 64-bit) for its size member.\n\n\n  *  However, several functions, such as re_emit_op_u32 and other internal parsing routines, incorrectly cast or store this DynBuf $\\text{size}\\_\\text{t}$ value into a signed int (typically 32-bit).\n\n\n  *  When a large or complex regular expression (such as those generated by a recursive pattern in a Proof-of-Concept) causes the bytecode size to exceed $2^{31}$ bytes (the maximum positive value for a signed 32-bit integer), the size value wraps around, resulting in a negative integer when stored in the int variable (Integer Overflow).\n\n\n  *  This negative value is subsequently used in offset calculations. For example, within functions like re_parse_disjunction, the negative size is used to compute an offset (pos) for patching a jump instruction.\n\n\n  *  This negative offset is then incorrectly added to the buffer pointer (s->byte\\_code.buf + pos), leading to an out-of-bounds write on the first line of the snippet below:\n\nput_u32(s->byte_code.buf + pos, len);","published":"2025-10-16T15:51:58.953Z","updated":"2026-10-19T16:10:00.260Z","reserved":"2025-10-15T08:47:41.878Z","status":"Analyzed","rejected":false,"assigner":"Google","metric":{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L","rating":"high","source":"Google"},"metrics":[{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L","rating":"high","source":"Google"},{"version":"4.0","score":7.1,"vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"high","source":"google.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["QuickJS"],"affectedProducts":[{"vendor":"QuickJS","product":"QuickJS","defaultStatus":"unaffected","versions":[{"lessThan":"2025-09-13","status":"affected","version":"2025-04-26","versionType":"date"}],"platforms":[]}],"packages":[],"cwes":["CWE-191"],"aliases":[],"references":[{"url":"https://bellard.org/quickjs/Changelog","tags":["Release Notes","advisory"]},{"url":"https://issuetracker.google.com/434196926","tags":["Exploit","Issue Tracking","report"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00468,"epssPercentile":0.41405,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-62495","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62495","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-62495","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-62495","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}