TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Almost 50% of web pages infected with DOM-based XSS. Learn How it is exploited

13 pointsby R41over 1 year ago

2 comments

ptxover 1 year ago
&gt; <i>Whenever anything is sent to the server from the browser, we need proper validation. Input should be properly sanitized before being sent to the server.</i><p>That doesn&#x27;t sound right. If the attack vector is reflected XSS, i.e. that code (HTML&#x2F;JS&#x2F;etc.) is taken from the attacker&#x27;s input, stored in the database by the server and later injected straight into another user&#x27;s page, sanitizing it &quot;before being sent to the server&quot; would mean relying on the attacker helpfully sanitizing their own data.
评论 #39337889 未加载
tailspin2019over 1 year ago
If the author is here could I make a gentle suggestion to change “infected with” to something like “potentially vulnerable to”.<p>“Infected” means something very specific and I think its usage in this case comes off as a bit clickbaity and detracts from the credibility of the article.<p>The article referenced as the source of that statistic uses more accurate wording (though doesn’t cite its own sources):<p>&gt; According to various research and studies, up to 50% of websites are vulnerable to DOM Based XSS vulnerabilities.<p>Also, “Almost 50%” != “up to 50%”