The technique exploits the interaction between browser caching mechanisms—specifically, the disk cache and the back/forward cache (bfcache)—and the way CSP nonces are handled in real-world applications.
Nonce-based CSPs work by generating a unique, unpredictable value (the nonce) for each page load, which is then required for any inline script to execute.
This mechanism is designed to prevent attackers from injecting and running unauthorized scripts, even if they manage to inject HTML into the page.
However, the new bypass hinges on two main preconditions:
<style> or <link rel="stylesheet"> tag.The attack unfolds in several steps:
<meta> tag (used for CSP in many applications). This combination allows the injected script—now bearing the correct nonce—to execute, bypassing the CSP’s intended protection.
The attack is made possible by subtle browser behaviors: disk cache can serve stale HTML with a previously valid nonce, while asynchronous requests (like fetches) can be updated to deliver new, attacker-controlled content.
This research highlights that even well-configured nonce-based CSPs can be undermined if caching and injection points are not carefully considered.
Developers are urged to:
The findings serve as a reminder that security is only as strong as its weakest link—and that browser internals, like caching, can have unexpected security implications.
Find this Story Interesting! Follow us on LinkedIn and X to Get More Instant updates
The post Researchers Bypassed Content Security Policy using HTML-injection Technique appeared first on Cyber Security News.
50 Years Ago The Massachusetts Public Interest Research Group (Mass-PIRG) has criticized the Northampton Small…
WESTHAMPTON — Voters shot down a request for a $500,000 Proposition 2½ override by 59 votes…
NORTHAMPTON — After setting 27 fires between 2007 and 2009 that terrorized Ward 3 neighborhoods…
SUNDERLAND — Investigators have determined that the fire at the Sugarloaf Estates apartment complex on…
Repeating the mantra that “food is medicine,” U.S. Rep. Jim McGovern is leading a bipartisan…
LEVERETT — A two-story home just east of North Leverett center was destroyed in a…
This website uses cookies.