且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP 'header()' HTTP Header Injection Vulnerability

更新时间:2022-09-17 07:40:02

An attacker can exploit this issue by enticing an unsuspecting user to follow a malicious URI. 

The following vulnerable code and example URI are available: 

<?php 
header('Location: '.$_GET['url']); 
print_r($_COOKIE); 
?> 

http://www.example.com/head1.php?url=http://example.com/head1.php%0DSet-Cookie:+NAME=foo