|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76244 A stack overflow vulnerability exist (most likely) in the isSet function
Submitted: 2018-04-20 11:12 UTC Modified: 2021-05-28 14:53 UTC
Avg. Score:4.3 ± 0.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daniel dot teuchert at rub dot de Assigned: cmb (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 7.2.4 OS: Linux 4.6.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-04-20 11:12 UTC] daniel dot teuchert at rub dot de
Calling isSet with too many parameters causes a stack overflow.
Executing the test script results in a stack overflow.
The produced ASAN output can be found here:
An attacker can possibly use this flaw to execute arbitrary code.

Steps to reproduce:
Build latest php version (compile with ASAN)
Donwload PoC file called "stack_overflow" (see Test script)
Execute binary file in $WORKDIR/php-7.2.4/sapi/cli/:
$WORKDIR/php-7.2.4/sapi/cli/php stack_overflow

I was not able to reproduce this behavior when debugging with gdb.

Test script:
PoC file can be found here:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-22 22:16 UTC]
This does not look like a security issue, since checking so many
variables in a single isset() does not appear to be of any
practical purpose.
 [2018-04-23 03:34 UTC]
-Type: Security +Type: Bug
 [2018-04-23 03:34 UTC]
Not a security issue, please see
 [2021-05-28 14:53 UTC]
-Status: Open +Status: Wont fix -Package: *Programming Data Structures +Package: Scripting Engine problem -Assigned To: +Assigned To: cmb
 [2021-05-28 14:53 UTC]
Actually, this looks like a recursion issue during parsing; I
don't think we want to "improve" the parser to handle such
pathological code.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 19:03:40 2023 UTC