Topic

Web security

7 posts All posts

Where user input turns into codeWeb security

What is SQL injection? The concept, the boundary and the fix

SQL injection explained by mechanism. Where user input turns into code, why validation does not fix it, why parameterised queries do, and what the fix costs.

More on Web security

One unauthenticated request. Any PHP that serves the web. Patch tonight.Web security

PHP2Shell: two unauthenticated RCE flaws in PHP, and what to patch tonight

CVE-2026-109618 and CVE-2026-109619 let an attacker run code on a PHP web server with a single unauthenticated request. Here is the mechanism, the fixed versions, and why mod_php setups are in the most danger.

It looks strict. It permits everything. Which is which?Try it

Read this CSP: four policies, which one actually stops an XSS?

Four Content-Security-Policy headers that all look strict. Predict what each one really permits before you read the answers, then paste any of them into the CSP builder to confirm.

Three of these four tell you how to forge them. Can you see it?Try it

Read this JWT: four tokens, which one would you trust?

Four JSON Web Tokens, three with a weakness you can see from the header and payload alone. Spot each flaw before the answers, then paste any token into the JWT inspector to confirm — and read the one-line server fix for each.

Five headers, one curl commandHow-to

Read your security headers in one command

Five response headers do most of the browser-side hardening work, and you can see all of them with curl. Here's what to run, what each one does, and what to set if it's missing.

A signed token stays valid until it expires, whatever you doWeb security

Your JWT cannot be logged out

The forgery bugs get all the attention and they are the easy half. The hard half is that a signed token stays valid until it expires, whatever you do afterwards — so a logout button, a password reset and a termination all quietly fail to end a session.

A CSP with an allowlist in it is usually bypassableWeb security

Your CSP probably does nothing

A Content-Security-Policy with an allowlist in it is usually bypassable, and the directives that stop the bypass are the ones nobody writes because nothing breaks when they are missing. What a policy actually has to contain, and why the good ones still get rolled back.

← All posts