{"id":8166,"date":"2021-07-26T19:29:44","date_gmt":"2021-07-27T00:29:44","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=8166"},"modified":"2021-08-19T10:31:33","modified_gmt":"2021-08-19T15:31:33","slug":"fortify-on-demand-remediation-cookie-security-overly-broad","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=8166","title":{"rendered":"Fortify on Demand Remediation &#8211; Cookie Security: Overly Broad"},"content":{"rendered":"<p>Cookies are tied to hostnames and paths. This vulnerability occurs because not every site is its own hostname \u2013 when you own <em>all<\/em> of application.example.com\/*, this is basically a false positive. But, if you host your app on a shared URL (e.g. look at\u00a0<a class=\"external-link\" href=\"http:\/\/www.rushworth.us\/lisa\" target=\"_blank\" rel=\"nofollow noopener\" data-ext-link-init=\"true\">www.rushworth.us\/lisa<\/a> and\u00a0<a class=\"external-link\" href=\"http:\/\/www.rushworth.us\/scott\" target=\"_blank\" rel=\"nofollow noopener\" data-ext-link-init=\"true\">www.rushworth.us\/scott<\/a> and\u00a0<a class=\"external-link\" href=\"http:\/\/www.rushworth.us\/owa\" target=\"_blank\" rel=\"nofollow noopener\" data-ext-link-init=\"true\">www.rushworth.us\/owa<\/a> &#8230; these are three different sites on my home web server. Scott, on is web site, could set a cookie with a path of &#8220;\/&#8221; that uses the same name as a cookie I use on my site\u00a0\u2013 my site would then use the stuff Scott stored through his site. Not such a problem in our scenarios, but a huge problem if you&#8217;re talking about a hundred different people&#8217;s blogs on some shared domain.<\/p>\n<p>To sort the vulnerability, set the cookie path to something more than \/<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=8167\" rel=\"attachment wp-att-8167\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8167\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2021\/08\/fod-cookie-path.png\" alt=\"\" width=\"875\" height=\"47\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2021\/08\/fod-cookie-path.png 875w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2021\/08\/fod-cookie-path-300x16.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2021\/08\/fod-cookie-path-768x41.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2021\/08\/fod-cookie-path-750x40.png 750w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cookies are tied to hostnames and paths. This vulnerability occurs because not every site is its own hostname \u2013 when you own all of application.example.com\/*, this is basically a false positive. But, if you host your app on a shared URL (e.g. look at\u00a0www.rushworth.us\/lisa and\u00a0www.rushworth.us\/scott and\u00a0www.rushworth.us\/owa &#8230; these are three different sites on my home &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[45,1437,35,69,1329],"class_list":["post-8166","post","type-post","status-publish","format-standard","hentry","category-coding","tag-coding","tag-fortify-on-demand","tag-php","tag-security","tag-web-coding"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8166"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8166\/revisions"}],"predecessor-version":[{"id":8168,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/8166\/revisions\/8168"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}