Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

null byte injection not happening

Tags:

php

This is my code

$file = $_GET['file'];
include "$file.html";

When I pass a URL like this: test.php?file=sample.php%00, the file sample.php should be included because of the null byte injection. But instead I'm getting an error: Failed opening 'sample.php' for inclusion.

I have checked the file path and also tried giving it the absolute path.

I am using PHP version 5.3.8 on Windows. What is it that I am missing here? Thanks

like image 576
depz123 Avatar asked Apr 08 '26 22:04

depz123


1 Answers

The null byte string vulnerability was fixed as of 5.3.4. That's why it's not working on your 5.3.8.

like image 174
Theodore R. Smith Avatar answered Apr 11 '26 14:04

Theodore R. Smith