



<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
    <title>Pragmatic Web Security</title>
    <description>This feed provides in-depth and nuanced articles on software security and secure application development. The articles provide concrete guidelines and address common questions and misconceptions on building secure applications.</description>
    <link>https://pragmaticwebsecurity.com/articles.html</link>
    <lastBuildDate>Mon, 08 Sep 2025 16:34:54 +0000</lastBuildDate>
    <pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate>
    <language>en</language>
    <atom:link href="https://pragmaticwebsecurity.com/feed.xml" rel="self" type="application/rss+xml" />
    <icon>https://pragmaticwebsecurity.com/icons/favicon-32x32.png</icon>
    <logo>https://pragmaticwebsecurity.com/pws_logo_rss.png</logo>
    <image>
        <url>https://pragmaticwebsecurity.com/pws_logo_rss.png</url>
        <title>Pragmatic Web Security</title>
        <link>https://pragmaticwebsecurity.com/articles.html</link>
        <width>100</width>
        <height>100</height>
        <description>This feed provides in-depth and nuanced articles on software security and secure application development. The articles provide concrete guidelines and address common questions and misconceptions on building secure applications.</description>
    </image>


 <item>
  <title>From Zero to Hero with CSP</title>
  <description>CSP is one of the most elaborate security policies in modern browsers. Besides acting as a second line of defense against XSS, CSP offers control over various types of content, outgoing connections, and the application's behavior. In this article, we elaborate on these features and provide you with a prioritized CSP deployment guide that will help you configure CSP in production.</description>
  <category>Security Policies</category>
  <link>https://pragmaticwebsecurity.com/articles/securitypolicies/csp-zero-to-hero.html</link>
  <guid isPermaLink="false">bfc9d7da-ac8b-445f-b664-d22a53ee3010</guid>
  <pubDate>Tue, 24 May 2022 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Deploying CSP in Single Page Applications</title>
  <description>The recommended best practice for modern CSP policies relies on hashes, nonces, and 'strict-dynamic'. Unfortunately, these features conflict with modern SPAs. This article proposes three concrete strategies to deploy secure CSP policies for SPAs. The first relies on a simple policy allowing 'self', which is acceptable under certain circumstances. The second strategy enables CSP hashes by rewriting the main page to use a script loader. The third strategy inserts nonces into a dynamically served main page.</description>
  <category>Security Policies</category>
  <link>https://pragmaticwebsecurity.com/articles/securitypolicies/deploying-csp-spa.html</link>
  <guid isPermaLink="false">0cc49ab7-300b-451c-964f-4275f9e70bdf</guid>
  <pubDate>Mon, 11 Apr 2022 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>7 Ways to Avoid JWT Security Pitfalls</title>
  <description>Like them or hate them, JSON Web Tokens (JWT) are everywhere. Unfortunately, JWTs also lie at the heart of numerous API security failures. In this article, we cover seven techniques that will help you avoid JWT security pitfalls.</description>
  <category>API Security</category>
  <link>https://pragmaticwebsecurity.com/articles/apisecurity/jwt-security-pitfalls.html</link>
  <guid isPermaLink="false">f7db37b0-2e18-4bad-8c48-548bc32f3155</guid>
  <pubDate>Wed, 22 Dec 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Defending against XSS with CSP</title>
  <description>Content Security Policy (CSP) started as a simple defense but quickly evolved into a complex security policy. This article investigates how to build an effective CSP policy to counter XSS vulnerabilities. Concretely, we use step-by-step examples to highlight bypasses against CSP and examine how to use nonces, hashes, and 'strict-dynamic' to build a robust CSP policy for modern applications.</description>
  <category>Security Policies</category>
  <link>https://pragmaticwebsecurity.com/articles/securitypolicies/xss-defense-csp.html</link>
  <guid isPermaLink="false">f1958744-c977-4894-85d6-a77902070400</guid>
  <pubDate>Mon, 13 Dec 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Securing SPAs with Trusted Types</title>
  <description>XSS vulnerabilities remain a top threat to any HTML-based web application. In fact, 75% of web vulnerabilities in Google's reward program are XSS vulnerabilities! Fortunately, built-in platform defenses such as Content Security Policy and Trusted Types equip us with the tools to tackle XSS. In this article, we briefly look at modern XSS vulnerabilities, followed by a detailed look at using Trusted Types policies to mitigate such vulnerabilities. In the end, we provide you with a list of concrete developer guidelines to apply Trusted Types in your projects.</description>
  <category>Security Policies</category>
  <link>https://pragmaticwebsecurity.com/articles/securitypolicies/trusted-types-spa.html</link>
  <guid isPermaLink="false">d833d88f-4e85-454f-aa82-2f7325c2ee7c</guid>
  <pubDate>Tue, 15 Jun 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>A Critical Analysis of Refresh Token Rotation in Single-page Applications</title>
  <description>In this article, we investigate the security properties of refresh tokens in the browser. We investigate why frontend web applications need refresh token rotation and what we gain by using refresh token rotation. Next, we dive into concrete attack scenarios that bypass refresh token rotation and discuss how sensitive SPAs should use a backend-for-frontend to secure tokens.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/critical-analysis-refresh-token-rotation.html</link>
  <guid isPermaLink="false">c07b7f1f-f2e3-45a9-9803-eeb96c633a4f</guid>
  <pubDate>Fri, 09 Apr 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Preventing XSS in Angular</title>
  <description>A Cross-Site Scripting (XSS) vulnerability can and will lead to the full compromise of a frontend application. An XSS vulnerability allows the attacker to control the application in the user's browser, extract sensitive information, and make requests on behalf of the application. Modern frameworks come with built-in defenses against XSS, but how far do they really go? In this article, we look at Angular's built-in XSS defenses, along with insecure coding patterns that inadvertently bypass these protections. </description>
  <category>SPA Security</category>
  <link>https://pragmaticwebsecurity.com/articles/spasecurity/angular-xss.html</link>
  <guid isPermaLink="false">f356309b-7b23-47dd-924c-71bed3174714</guid>
  <pubDate>Mon, 01 Feb 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Are you causing XSS vulnerabilities with JSON.stringify()?</title>
  <description>JSON.stringify() is perhaps one of the most mundane APIs in modern browsers. The functionality to translate a JavaScript object into a string-based representation is hardly thrilling. But when the stars align, a simple JSON serialization operation can result in a significant XSS vulnerability. This article tells the nail-biting story of such a vulnerability in Scully, an Angular-based static site generator.</description>
  <category>SPA Security</category>
  <link>https://pragmaticwebsecurity.com/articles/spasecurity/json-stringify-xss.html</link>
  <guid isPermaLink="false">adb94e9b-5e50-46d0-96e0-f52167d2fda4</guid>
  <pubDate>Tue, 26 Jan 2021 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Running iframe-based flows in the OAuth 2.0 Flow Simulator</title>
  <description>Traditionally, OAuth 2.0 applications rely on iframes to silently obtain tokens in the background while the application remains running in the foreground. With the ongoing efforts to block third-party cookies, these flows become increasingly unreliable. Use the new version of the Flow Simulator to visualize the effects of third-party cookie blocking in Brave and Safari.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/flow-simulator-frames.html</link>
  <guid isPermaLink="false">9b84ae49-de0c-4f7d-be1f-a71f0035d777</guid>
  <pubDate>Tue, 24 Nov 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Current best practices to restrict framing in the browser</title>
  <description>Frame-based attacks such as clickjacking and UI redressing may be obscure, but they are (still) very real. They even threaten APIs, which have nothing to do with iframes and web pages. This article gives an overview of the threats, discusses recent changes in framing restriction mechanisms, and provides concrete recommendations to secure modern web applications.</description>
  <category>Security Policies</category>
  <link>https://pragmaticwebsecurity.com/articles/securitypolicies/preventing-framing-with-policies.html</link>
  <guid isPermaLink="false">b1e2cebd-facb-44e4-bd61-56df3ea1e178</guid>
  <pubDate>Tue, 15 Sep 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Everybody wins with the Device Flow</title>
  <description>Have you ever heard of the device flow, or the OAuth 2.0 Device Authorization Grant? If not, make sure you keep reading, as the device flow is pretty awesome to support an ever-growing group of applications. If you already know about the device flow, you should skip to the second half of the article, where we discuss the details and the surprising amount of security benefits. </description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/device-flow.html</link>
  <guid isPermaLink="false">03424dbb-56be-480e-9dcc-d1a74bc97594</guid>
  <pubDate>Tue, 18 Aug 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Introducing the OAuth 2.0 Flow Simulator</title>
  <description>I often need to explain the different steps in OAuth 2.0 and OpenID Connect flows, for example during a training or consulting session. Illustrating the numerous steps with a real-world application is always challenging, especially since many of the requests are invisible to the user. That's why I built the Flow Simulator, which allows you to walk through a flow step by step, while visualizing all the relevant details. Keep reading to learn all about the publicly available Flow Simulator.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/oauth-flow-simulator.html</link>
  <guid isPermaLink="false">dacd1ce1-30b7-44ab-914c-e7436462da9b</guid>
  <pubDate>Tue, 07 Jul 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>A free introductory course on OAuth 2.0 and OpenID Connect</title>
  <description>Everyone who first learns about OAuth 2.0 and OpenID Connect is confused. There are dozens of specifications with uncommon terminology and hard-to-understand scenarios. That's why I am excited to announce this free introductory course, which is the perfect starting point for your journey into OAuth 2.0 and OpenID Connect. More details are available in this article.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/free-intro-oauth-oidc.html</link>
  <guid isPermaLink="false">1675ff60-c55b-454a-9c12-7acaf4380cd3</guid>
  <pubDate>Wed, 01 Jul 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Preventing XSS in React (Part 3): escape hatches and component parsers</title>
  <description>Preventing XSS in React is manageable when you stay within the boundaries of the framework, but becomes hard once you step out of React's safe zone. In this article, we take a closer look at escape hatches and component parsers and all the reasons you should avoid them. Read on to discover the next level of XSS in React applications.</description>
  <category>SPA Security</category>
  <link>https://pragmaticwebsecurity.com/articles/spasecurity/react-xss-part3.html</link>
  <guid isPermaLink="false">2ea0b623-aae2-4658-b454-48d98718ecec</guid>
  <pubDate>Sun, 14 Jun 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Preventing XSS in React (Part 2): dangerouslySetInnerHTML</title>
  <description>Dynamically rendering benign HTML code in React requires the use of <code>dangerouslySetInnerHTML</code>. That is not a naming mistake. This property is dangerous, and using it carelessly will create XSS vulnerabilities in your application. In this article, we discuss why the property is there, how you can use it, and how the Signal messenger misused it. This article is the second in a series of three, and a must-read for every React developer.</description>
  <category>SPA Security</category>
  <link>https://pragmaticwebsecurity.com/articles/spasecurity/react-xss-part2.html</link>
  <guid isPermaLink="false">5fda67fc-7eac-4707-923c-7679b02c7c60</guid>
  <pubDate>Thu, 28 May 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>My high-quality idiot-proof recording setup</title>
  <description>Good audio for virtual presentations is absolutely critical. Even before the new world of 2020, I was delivering remote training and recording videos, so I invested in a decent audio setup. Since the Corona pandemic coincided with the birth of our third child, training from home sure became a totally new challenge. To make that as comfortable as possible, I built myself a standing desk and added a dedicated camera to the setup. A few people asked about my setup, I decided to provide a bit more details in this article. </description>
  <category>Productivity</category>
  <link>https://pragmaticwebsecurity.com/articles/productivity/idiot-proof-audio-recording.html</link>
  <guid isPermaLink="false">d7402f40-91db-4b7d-ac78-a976ac3a6046</guid>
  <pubDate>Thu, 21 May 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Preventing XSS in React (Part 1): Data binding and URLs</title>
  <description>A Cross-Site Scripting (XSS) vulnerability can and will lead to the full compromise of a frontend application. An XSS vulnerability allows the attacker to control the application in the user's browser, extract sensitive information, and make requests on behalf of the application. Modern frameworks come with built-in defenses against XSS, but how far do they really go? In this article series, we look at how React prevents XSS, but also how its shortcomings leave a lot in the hands of a developer. This article is the first in a series of three.</description>
  <category>SPA Security</category>
  <link>https://pragmaticwebsecurity.com/articles/spasecurity/react-xss-part1.html</link>
  <guid isPermaLink="false">1bd54c56-0c3c-4fc0-8cc9-c0a9c31487ad</guid>
  <pubDate>Wed, 13 May 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>From the Implicit flow to PKCE: A look at OAuth 2.0 in SPAs</title>
  <description>About a year ago, the OAuth 2.0 Implicit flow became deprecated. That decision caused a lot of confusion and frustration. In this article, we analyze the different OAuth 2.0 flows to find out why the OAuth working group made that decision. Read on to find out about current best practices for using OAuth 2.0 in modern web applications.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/from-implicit-to-pkce.html</link>
  <guid isPermaLink="false">ac39e626-7423-4929-9589-9bd797608bec</guid>
  <pubDate>Thu, 07 May 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>An in-depth look at refresh tokens in the browser</title>
  <description>Single Page Applications can use refresh tokens in the browser. Yes, you read that right. This new development is awesome, because it makes access token renewal much more elegant. However, refresh tokens in the browser require additional security measures, such as refresh token rotation. We discuss the pros and cons of refresh token rotation, along with the potential dangers. In the end, you will find five strategies you can use to secure your tokens in your web frontends better. </description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/refresh-token-protection-implications.html</link>
  <guid isPermaLink="false">3abac397-8dff-46aa-b4be-7b8d6ecff005</guid>
  <pubDate>Thu, 30 Apr 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Why avoiding LocalStorage for tokens is the wrong solution</title>
  <description>Most developers are afraid of storing tokens in LocalStorage due to XSS attacks. While LocalStorage is easy to access, the problem actually runs a lot deeper. In this article, we investigate how an attacker can bypass even the most advanced mechanisms to obtain access tokens through an XSS attack. Concrete recommendations are provided at the end.</description>
  <category>OAuth 2.0 &amp; OpenID Connect</category>
  <link>https://pragmaticwebsecurity.com/articles/oauthoidc/localstorage-xss.html</link>
  <guid isPermaLink="false">70e373db-3516-42f7-8fad-f409d89ef1ed</guid>
  <pubDate>Thu, 16 Apr 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>Tamper-proof URL parameters with JWTs</title>
  <description>URL parameters are straightforward to send information along in a request. Decades ago, we already used them to transport session identifiers, and today, many applications still use them for all kinds of purposes. But are URL parameters secure? What alternatives are there? Keep reading to find out more.</description>
  <category>API Security</category>
  <link>https://pragmaticwebsecurity.com/articles/apisecurity/tamper-proof-params-jwt.html</link>
  <guid isPermaLink="false">5cacef05-19a9-4096-8b9f-cf07c4ba414d</guid>
  <pubDate>Tue, 14 Apr 2020 00:00:00 +0000</pubDate>
 </item>
 
 <item>
  <title>The hard parts of JWT security nobody talks about</title>
  <description>In spite of the popularity of JWTs, their security properties are often unknown or misunderstood. How do you choose the signature scheme for a JWT? What other properties should you verify before trusting a JWT? How do you handle key rotation and key management? Read on for a deep-dive into JWT security.</description>
  <category>API Security</category>
  <link>https://pragmaticwebsecurity.com/articles/apisecurity/hard-parts-of-jwt.html</link>
  <guid isPermaLink="false">b2423a74-929e-440d-9d00-1e445ffa2897</guid>
  <pubDate>Fri, 13 Mar 2020 00:00:00 +0000</pubDate>
 </item>
 

</channel>
</rss>