php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2472 poison null byte
Submitted: 1999-10-09 08:31 UTC Modified: 2002-06-16 08:59 UTC
From: kerb at fnusa dot com Assigned:
Status: Not a bug Package: Other
PHP Version: 3.0.12 OS: Linux 2.2.12
Private report: No CVE-ID: None
 [1999-10-09 08:31 UTC] kerb at fnusa dot com
I'm not sure if you've been notified of this, but the same problem that exists in perl-based CGI scripts
involving the "poison null byte" exists in PHP.  I was able to POST the following to a script:

name=John%00+Q.+Public

which should translate to "John Q. Public", although if you post that to a PHP document such as
<?php
    echo "Your name is $name";
?>

it will actually print "Your name is John" and stop there.  in perl, I know I can s/%00//ge my URL-encoded strings before I actually decode them, but PHP (from the bit I have used it) decodes all posted variables automatically.  For more detail into the inner working of the poison null byte, read Phrack issue 55, article 7:  http://www.phrack.com/search.phtml?view&article=p55-7

-Kerb

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:59 UTC] sander@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 07:01:28 2024 UTC