{"id":3874,"date":"2022-01-29T10:28:20","date_gmt":"2022-01-29T10:28:20","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=3874"},"modified":"2022-01-29T10:28:20","modified_gmt":"2022-01-29T10:28:20","slug":"what-does-xss-stand-for-how-can-it-be-prevented","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/","title":{"rendered":"What does XSS stand for ? How can it be prevented ?"},"content":{"rendered":"<p style=\"text-align: justify;\">XSS stands for Cross-site scripting. It is a web security flaw that allows an attacker to manipulate how users interact with a susceptible application. It allows an attacker to get around the same-origin policy, which is meant to keep websites separate from one another. Cross-site scripting flaws allow an attacker to impersonate a victim user and execute any actions that the user is capable of, as well as access any of the user\u2019s data. If the victim user has privileged access to the application, the attacker may be able to take complete control of the app\u2019s functionality and data.<\/p>\n<p style=\"text-align: justify;\">Preventing cross-site scripting can be simple in some circumstances, but it can be much more difficult in others, depending on the application\u2019s sophistication and how it handles user-controllable data. In general, preventing XSS vulnerabilities will almost certainly need a mix of the following measures:<br \/>\n<strong>On arrival, filter the input.<\/strong>\u00a0Filter user input as precisely as feasible at the point when it is received, based on what is expected or valid input.<br \/>\n<strong>On the output, encode the data.<\/strong>\u00a0Encode user-controllable data in HTTP responses at the point where it is output to avoid it being perceived as active content. Depending on the output context, a combination of HTML, URL, JavaScript, and CSS encoding may be required.<br \/>\n<strong>Use headers that are relevant for the response.<\/strong>\u00a0You can use the Content-Type and X-Content-Type-Options headers to ensure that browsers read HTTP responses in the way you intend, preventing XSS in HTTP responses that aren\u2019t intended to contain any HTML or JavaScript.<br \/>\n<strong>Policy for Content Security.<\/strong>\u00a0You can utilize Content Security Policy (CSP) as a last line of defense to mitigate the severity of any remaining XSS issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>XSS stands for Cross-site scripting. It is a web security flaw that allows an attacker to manipulate how users interact with a susceptible application. It allows an attacker to get around the same-origin policy, which is meant to keep websites separate from one another. Cross-site scripting flaws allow an attacker to impersonate a victim user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16540],"tags":[],"class_list":["post-3874","post","type-post","status-publish","format-standard","hentry","category-cyber-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What does XSS stand for ? How can it be prevented ?<\/title>\n<meta name=\"description\" content=\"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What does XSS stand for ? How can it be prevented ?\" \/>\n<meta property=\"og:description\" content=\"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-29T10:28:20+00:00\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/\"},\"author\":{\"name\":\"webmaster\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"headline\":\"What does XSS stand for ? How can it be prevented ?\",\"datePublished\":\"2022-01-29T10:28:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/\"},\"wordCount\":296,\"commentCount\":0,\"articleSection\":[\"Cyber Security\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/\",\"name\":\"What does XSS stand for ? How can it be prevented ?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"datePublished\":\"2022-01-29T10:28:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/cyber-security\\\/what-does-xss-stand-for-how-can-it-be-prevented\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\"],\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/webmaster\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What does XSS stand for ? How can it be prevented ?","description":"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/","og_locale":"en_US","og_type":"article","og_title":"What does XSS stand for ? How can it be prevented ?","og_description":"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/","og_site_name":"Wikitechy","article_published_time":"2022-01-29T10:28:20+00:00","author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/"},"author":{"name":"webmaster","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"headline":"What does XSS stand for ? How can it be prevented ?","datePublished":"2022-01-29T10:28:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/"},"wordCount":296,"commentCount":0,"articleSection":["Cyber Security"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/","name":"What does XSS stand for ? How can it be prevented ?","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2022-01-29T10:28:20+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What does XSS stand for ? How can it be prevented ? - XSS stands for Cross-site scripting.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/cyber-security\/what-does-xss-stand-for-how-can-it-be-prevented\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=3874"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3874\/revisions"}],"predecessor-version":[{"id":3875,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/3874\/revisions\/3875"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=3874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=3874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=3874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}