Out-of-bounds Write Affecting php package, versions [,8.4.24)[8.5.0,8.5.9)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.43% (36th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Out-of-bounds Write vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-PHP-19477231
  • published1 Sept 2026
  • disclosed30 Jul 2026
  • creditrecepasan

Introduced: 30 Jul 2026

CVE-2026-17544  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade php to version 8.4.24, 8.5.9 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write through bc_str2num() in ext/bcmath/libbcmath/src/str2num.c. An attacker can corrupt stack or heap memory by calling bccomp() with a crafted operand and scale that truncates a fraction and then trims trailing zeros, causing the code to copy more digits than were reserved. When the vulnerable path processes small numbers in BCMath’s stack-allocated arena, the write reaches stack memory; otherwise it can overflow a heap buffer. This can crash PHP or enable memory corruption during comparison of attacker-controlled numeric strings.

CVSS Base Scores

version 4.0
version 3.1