<s>
HTTP	B-Protocol
response	I-Protocol
splitting	I-Protocol
is	O
a	O
form	O
of	O
web	B-Application
application	I-Application
vulnerability	O
,	O
resulting	O
from	O
the	O
failure	O
of	O
the	O
application	O
or	O
its	O
environment	O
to	O
properly	O
sanitize	O
input	O
values	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
to	O
perform	O
cross-site	O
scripting	O
attacks	O
,	O
cross-user	O
defacement	O
,	O
web	B-General_Concept
cache	I-General_Concept
poisoning	I-General_Concept
,	O
and	O
similar	O
exploits	O
.	O
</s>
<s>
The	O
attack	O
consists	O
of	O
making	O
the	O
server	O
print	O
a	O
carriage	O
return	O
(	O
CR	O
,	O
ASCII	B-Protocol
)	O
line	O
feed	O
(	O
LF	O
,	O
ASCII	B-Protocol
)	O
sequence	O
followed	O
by	O
content	O
supplied	O
by	O
the	O
attacker	O
in	O
the	O
header	B-Protocol
section	O
of	O
its	O
response	O
,	O
typically	O
by	O
including	O
them	O
in	O
input	O
fields	O
sent	O
to	O
the	O
application	O
.	O
</s>
<s>
Per	O
the	O
HTTP	B-Protocol
standard	O
(	O
RFC	B-Protocol
2616	I-Protocol
)	O
,	O
headers	O
are	O
separated	O
by	O
one	O
CRLF	O
and	O
the	O
response	O
's	O
headers	O
are	O
separated	O
from	O
its	O
body	O
by	O
two	O
.	O
</s>
<s>
The	O
generic	O
solution	O
is	O
to	O
URL-encode	O
strings	O
before	O
inclusion	O
into	O
HTTP	B-Protocol
headers	I-Protocol
such	O
as	O
Location	O
or	O
Set-Cookie	O
.	O
</s>
<s>
Typical	O
examples	O
of	O
sanitization	O
include	O
casting	O
to	O
integers	O
or	O
aggressive	O
regular	B-Language
expression	I-Language
replacement	O
.	O
</s>
<s>
Although	O
response	O
splitting	O
is	O
not	O
specific	O
to	O
PHP	B-Application
,	O
the	O
PHP	B-Application
interpreter	I-Application
contains	O
protection	O
against	O
the	O
attack	O
since	O
version	O
4.4.2	O
and	O
5.1.2	O
.	O
</s>
