PHP 5.6.6 move_uploaded_file() NULL byte filename truncation

2015.04.18
Credit: habte
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-264


CVSS Base Score: 5/10
Impact Subscore: 2.9/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: None
Integrity impact: Partial
Availability impact: None

Description: ------------ with newer versions of PHP, we all taught Nullbytes issues were over. but there is still one simple bypass and I still have no clue why there is. Test script: --------------- move_uploaded_file($_FILES['x']['tmp_name'],"/tmp/test.php\x00.jpg") That file will create what you think it shouldn't! Actual result: -------------- I expect the fix of the next version to notice nullbytes and actually not ignore them this time. Thanks!

References:

https://bugs.php.net/bug.php?id=69207


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top