Articles
Articles
Practical writing on building digital products, cybersecurity, and AI in a developer's daily work.
More topics (2)
3 min read#App security#Web developmentYour page listens for postMessage? Any site can send it a message
Any window can send postMessage to your page. Check event.origin before you trust a message, check its shape, and set targetOrigin instead of * when you send.
4 min read#App security#Web developmentLeft the .git folder on your server? Anyone can download your code
If the .git folder went out with your deploy and opens in a browser, it holds every version of your code. Check the HEAD link now, and block the folder in your server config.
3 min read#App security#Web developmentWhy your password reset link can point to an attacker's domain
Your app builds the link from the Host header that the request itself sends. Limit the domains you accept, and build email links from a fixed address in your settings.
3 min read#AI#Developer toolsclaude -p runs a repo's hooks without asking: use --bare in scripts
Without --bare, claude -p runs the repo's hooks and connects its MCP servers even if you never trusted it, and asks nothing. In scripts and CI, run it with --bare and name the tools.
3 min read#App security#Web developmentAnyone can send email as your domain: close it with DMARC
A DMARC record is a TXT line at _dmarc on your domain that tells receivers what to do with mail in your name that fails SPF and DKIM. Start with p=none and rua reports, then quarantine, then reject.
2 min read#App security#Web developmentA user's name became code on your server: preventing SSTI
SSTI happens when the server's template engine evaluates user input as template code. The fix: a fixed template, user input passed as variables, and user-written templates in a sandbox.
3 min read#App security#Web developmentThe code that changes every 30 seconds: verify TOTP correctly
A TOTP code comes from a shared secret and a clock. To protect your users, allow at most one time step of delay, reject a code that was already accepted, and store the secret in a protected place.
3 min read#Security updates#App securityDrupal installer flaw under attack: update to 11.4.14, check user 1
Advisory SA-CORE-2026-019 says Drupal sites that left install.php reachable can be taken over, and the flaw is being exploited. Update to 11.4.14, 11.3.23 or 10.6.23, run update.php, and check the user 1 account.
3 min read#App security#Web developmentA folder without index.html lists every file: turn listing off
If a folder on your site has no index file and the server is allowed to build a listing, any visitor who opens it sees every file inside. On Nginx keep autoindex off, and on Apache remove Indexes with Options -Indexes.
3 min read#App security#Web developmentThe blog you shut down still serves an attacker: subdomain takeover
If you remove a hosted service but leave its CNAME record in DNS, anyone can claim the same name at that provider and publish their content on your subdomain. Remove DNS records first when you shut down, and create them last when you set up.
3 min read#App security#Web developmentAn API without limits bills you for someone else: set a cap
According to OWASP, an API is exposed if even one limit is missing or set wrong: execution time, memory, upload size, operations per request, records per page, or a third-party spending limit.
3 min read#App security#Web developmentNEXT_PUBLIC variables reach the browser: keep secrets out
Next.js writes the value of any environment variable that starts with NEXT_PUBLIC into the JavaScript every visitor downloads, at next build time. A secret key stays in a variable without that prefix, read on the server only.
3 min read#AI#App securityA model that passes every test, yet poisoned? OWASP LLM04
According to OWASP, data poisoning is manipulation of pre-training, fine-tuning or embedding data, and it can plant a backdoor that only shows on a certain trigger. The defense: track data origins and versions, and sandbox unverified sources.
3 min read#App security#Web developmentCan one GraphQL query wear out your server? Set depth limits
In GraphQL, depth and amount can be unlimited by default, which OWASP says can lead to DoS. Set depth and amount limits and timeouts, and turn off introspection and GraphiQL in production.
3 min read#App security#Web developmentReset tokens from Math.random? How to make tokens nobody can guess
Math.random does not give cryptographically secure random numbers, and MDN says not to use it for anything security related. For tokens and session IDs, use a secure generator like crypto.getRandomValues or crypto.randomUUID.
3 min read#AI#App securityDid your chatbot show one user another user's data? Closing LLM02
Per OWASP, a language model can reveal personal data or business secrets in its answers, and system prompt rules are not always honored. The fix is that the model only sees what the user may see, and data gets cleaned before it reaches it.
2 min read#App security#Web developmentCan plain data run code on your server? Insecure deserialization
Insecure deserialization happens when your app rebuilds objects from outside data in a language's native format. Per OWASP, avoiding native formats greatly reduces the risk, and JSON is a safe format to use instead.
2 min read#Supply chain security#Developer toolsDoes npm install run code you never read? Stop install scripts
With npm install, any package in your dependency tree can run a preinstall, install or postinstall script on your machine. The ignore-scripts setting stops them, and npm's own docs say their only valid use is compiling on the target machine.
2 min read#App security#Web developmentSame session ID after login? How to stop session fixation
In session fixation, the attacker plants a session ID in your browser before you log in, then uses it. Per OWASP, your app must renew the session ID after any privilege change, above all at login.
2 min read#AI#Supply chain securityYour AI assistant suggested a package that doesn't exist?
AI coding assistants can suggest packages that do not exist. Per OWASP, attackers look for these names and publish malicious packages under them, so check every package before you install it.
2 min read#App security#Web developmentYour account page showing for another user? Cache-Control decides
A page with a user's data must not be stored in a shared cache such as a CDN. Per MDN, private keeps it in the browser cache only, no-store stops any cache from storing it, and no-cache does not mean don't cache.
3 min read#App security#Web developmentCan a filename run commands on your server? Closing command injection
OS command injection happens when your code builds a shell command from user input, so a character like ; adds a second command. OWASP says the first fix is to not call OS commands at all and use your language's library.
2 min read#App security#Web developmentCan one regex line freeze your server? How to spot ReDoS
ReDoS sends crafted text to a regex that has repetition inside repetition, so the check tries paths that double with every character. Per OWASP, 16 characters give 65536 paths.
3 min read#AI#App securityDoes your RAG assistant answer from another customer's files?
The vector database in a RAG app can return chunks from another tenant if the search doesn't filter by permission. OWASP calls it LLM08:2025, and the fix is fine-grained permissions in the search itself and trusted sources.
2 min read#Security updates#App securityApache Roller flaw on CISA's list: upgrade to 6.1.6 or close XML-RPC
CVE-2026-129448 in the XML-RPC endpoint of Apache Roller lets an attacker with no account run code on the server, and it is being exploited. Upgrade to 6.1.6 or later, or close the endpoint in web.xml.
2 min read#App security#Web developmentYour site never uses the camera? Turn it off with Permissions-Policy
The Permissions-Policy header tells the browser which features are allowed on your page and in the iframes inside it. The value () turns a feature off everywhere, so turn off the camera, microphone and location if you don't use them.
2 min read#App security#Web developmentCan one DOCTYPE line in XML read your server's files? Closing XXE
XXE happens when your XML parser resolves an external entity from a file the user sent, so it reads a file from the server and puts it in the reply. OWASP's advice: disable DTDs in the parser whenever possible.
2 min read#AI#App securityNobody hacked you, but your AI bill exploded: put limits on your app
Unbounded consumption (LLM10:2025 in OWASP's list) happens when your app lets anyone send requests to the model with no limit. The fix: a cap on input size, a cap on requests per user, and a timeout for each request.
2 min read#Security updates#App securityJava4Shell: CISA's Java alert, and how to find every JVM you run
CISA urges immediate patching of CVE-2026-114938 in the JVM's Base64 decoder. Start by finding every Java runtime you run, including ones hidden in apps and container images, then patch per Oracle's advisory.
2 min read#App security#Web developmentThe browser rejected * with cookies? Don't echo the Origin back
With a request that carries cookies, the browser won't accept Access-Control-Allow-Origin set to *, so many people echo back any Origin. Use an allowlist instead, plus Vary: Origin.
2 min read#App security#Web developmentDoes your JWT tell you how to verify it? Why you pick the algorithm
A JWT carries the name of its signing algorithm in the alg header, and an attacker can change it to none or from RS256 to HS256. The fix: your server decides which algorithms it accepts and rejects the rest.
2 min read#AI#App securityCan your AI agent delete things? Cut its tools and its permissions
Excessive Agency is when an LLM agent can do more than its job. The OWASP fix: fewer tools, permissions sized to the task, and a human approval before any high-impact action.
3 min read#App security#Web developmentCan anyone post to your webhook URL? How to check the signature
Your webhook URL is open to the whole internet, so before you trust any request, compute the HMAC signature from the secret and the raw body, and compare it with the one in the header using a constant-time comparison.
3 min read#AI#App securityLLM output going into innerHTML or SQL? Treat it as user input
The OWASP list of LLM app risks says the model's output can be steered by the prompt, so treat it like any user's input: encoding by context, parameterized queries, and a CSP.
2 min read#App security#Web developmentCan a strange site load your page in an iframe? Stop clickjacking
Clickjacking uses transparent or opaque layers so the user clicks a button on another page while meaning to click the page in front. The fix starts with one header: CSP frame-ancestors, with X-Frame-Options.
2 min read#App security#PrivacyIs a user's password sitting in your logs? What must stay out of them
Logs end up in central stores, archives and backups. The OWASP cheat sheet says passwords, tokens, session IDs and encryption keys should not go into them directly: remove, mask or hash them.
2 min read#AI#App securityAn API key in your system prompt? Treat it as visible to the user
The OWASP list of LLM app risks says the system prompt is not a secret and cannot be a security control. Keys, permissions and sensitive rules stay out of it, and the protection lives in the code around the model.
3 min read#App security#Web developmentCredential stuffing: leaked passwords that open accounts on your site
Credential stuffing is trying email and password pairs leaked from another site on your login page. Per OWASP, the strongest defense is MFA, then layers: CAPTCHA for suspicious logins, checks against breached passwords, and user alerts.
2 min read#App security#Web developmentDoes your error page print a stack trace? Hide it from attackers
A stack trace shown to the user gives an attacker your server and library names and versions, and sometimes a place to inject. The OWASP fix: a global error handler that returns a generic message, with the details in server logs only.
3 min read#App security#Web developmentOne JSON key that changes every object in your app: prototype pollution
Prototype pollution happens when your code merges user JSON into a plain object, so a key like proto reaches the shared prototype. The OWASP fix: Map and Set, objects with no prototype, and frozen prototypes.
3 min read#App security#Web developmentYour 'forgot password' link: how to build it without a back door
A password reset page becomes a way to take over accounts if the link can be guessed, keeps working, or is built from the Host header. The OWASP fix: one message for everyone, a long random single-use token that expires, and a fixed domain in the link.
3 min read#App security#Web developmentA button on another site changed a user's email? How to stop CSRF
CSRF tricks a logged-in user's browser into sending a request to your site they never meant to send. The main fix is a server-generated token checked on every state-changing request, with SameSite as an extra layer.
3 min read#App security#Web developmentA download link that opens server files? How to stop path traversal
Path traversal is when your code builds a file path from user input, so an attacker writes ../ to climb out of the folder and read other files. The fix is to never build the path from input, or to accept only known values.
3 min read#App security#Web developmentinnerHTML blocks script tags, but a broken image still runs code
innerHTML does not run script tags, but it runs code from other places, like onerror on an image. If the text comes from a user and you want to show it as text, use textContent.
3 min read#App security#Web developmentA 3-field form made a user admin? Here is how to stop mass assignment
Mass assignment is when your code copies every request field onto the user record, so an attacker adds a field the form never had, like isAdmin. The fix is an allowlist of fields, or a DTO that carries only what you want.
4 min read#App security#Web developmentA .jpg that runs as code? How to protect file uploads
File upload becomes a flaw when the server trusts the file name and type the browser sends. The fix is that the server decides: extensions from an allowlist, a name it generates, storage outside the webroot, and a size limit.
4 min read#App security#Web developmentYour server fetches a URL the user sent? Here is how to close SSRF
SSRF is when an attacker makes your server send a request somewhere it should never reach, such as your internal network or the cloud metadata service. The fix is an allowlist the server builds the request from, no redirect following, and checking the address after DNS.
6 min read#WordPress#Security updatesWordPress upgrade flaw now exploited: which release fixes your branch?
CISA added CVE-2026-119977 to its list of exploited flaws: a race in the WordPress upgrade process that can lead to code execution without a login. Here is the fixed release for every branch, versions 4.7 through 7.1.3, and how to confirm your site runs it.
4 min read#App security#Web developmentDoes your login say the email isn't registered? It leaks your users
A message that says whether an account exists lets anyone learn who uses your site. The fix is one message and one response time for login, password reset and sign up, plus a per-account limit on attempts.
4 min read#App security#Web developmentBuilding SQL by joining strings? Close SQL injection with parameters
SQL injection happens when a user's value is pasted into the query text and changes its shape. The fix is a parameterized query: the query's shape stays fixed in code, and the values reach the database separately.
7 min read#Security updates#App securitybetter-auth 1.7.16 fixes 12 flaws: who is exposed, and what to do?
better-auth 1.7.16 fixes 12 flaws. The critical one only hits servers that register the expo() plugin, Electron plugin users must rotate their secrets, and web-only apps should still read the moderate list.
8 min read#Security updates#App securityOpenSSH on Alpine: a long password gets in. Are you exposed?
On Alpine and other musl systems without PAM, sshd accepted a very long password for accounts that have none. Install the fixed openssh package and restart sshd, or turn off password logins.
7 min read#Security updates#App securityCritical Active Storage flaw: is your Rails app exposed? What now?
Rails 8.1.4.1 and 8.0.5.2 fix 21 security issues. In the worst, an upload from an unauthenticated attacker may write files on the server when ImageMagick processes images. Update, and rotate secrets if files sit on Disk.
3 min read#App security#Developer toolsCan one git push leak a secret key? Turn on push protection
GitHub push protection scans every push before it reaches the repository and blocks it if it contains a key or token. For users it is on by default for public repositories only; for a repository you turn it on in Settings.
4 min read#App security#Web developmentOne number in the URL shows another user's data? Fix IDOR
IDOR happens when the server fetches a record by the ID in the request without checking that it belongs to the user. The fix is an access check on every object, with the user taken from the session, not the request.
3 min read#App security#Web developmentCan your login link send users to a fake page? Fix open redirects
An open redirect is a page on your site that takes the destination from the request and redirects to it unchecked, so a link with your name on it lands on a phishing page. The fix: never take the URL from the user, or map it to a list on your server.
3 min read#App security#PrivacyIs your password reset link leaking? Set Referrer-Policy
Browsers send your page address with requests in the Referer header. The Referrer-Policy header decides how much of it goes out, and no-referrer removes it from sensitive pages.
2 min read#App security#Web developmentCan an uploaded text file open as a page? Add nosniff
The X-Content-Type-Options: nosniff header tells the browser to follow the Content-Type your server sent instead of guessing the type from the content, so a text/plain file with HTML in it stays text.
4 min read#Security updates#Web developmentSeven fixes in Next.js 16.4.5: who needs to update today?
Next.js 16.4.5 and 15.5.29 close seven flaws, including a cache that can hand one tenant's data to another and HttpOnly cookies readable on Edge routes. Update, then see which ones touch your app.
3 min read#App security#Web developmentTurn on CSP without breaking your site: start with Report-Only
Ship your CSP first in the Content-Security-Policy-Report-Only header: the browser reports every script it would have blocked and the site keeps working. Fix the violations, then enforce it.
3 min read#App security#Web developmentSomeone found a hole in your site. How do they reach you?
security.txt is a small text file at /.well-known/security.txt that tells a security researcher where to send the hole they found. Two fields are required, Contact and Expires, and the rest are optional.
4 min read#App security#Web developmentYour site runs HTTPS. Why is the first request still exposed?
HSTS is a header that tells the browser to open your site over HTTPS only, even when someone types http. Start with one day, check every subdomain, then raise it to two years.
5 min read#App security#Web developmentHow to store user passwords: Argon2id with the OWASP settings
Store a password as a slow hash, not as encrypted text: Argon2id with 19 MiB of memory, 2 iterations and 1 thread per OWASP, and let the library make the salt.
4 min read#Security updates#App securityOne SAML assertion, two sessions: update Snipe-IT to 8.5.0 or later
In Snipe-IT up to 8.4.1, one captured SAML assertion opens two sessions for the victim, and revoking at the identity provider reaches only one. Fixed in 8.5.0.
4 min read#App security#Web developmentA CDN script can change under you: lock it with Subresource Integrity
Add integrity and crossorigin to every script or stylesheet you load from someone else's server, and the browser refuses the file if its content does not match the hash you wrote.
4 min read#AI#App securityOne email your AI agent reads can leak your inbox: limit its tools
There is no sure way to stop instructions hidden in what your agent reads, so the protection is in its tools: give it the least access it needs, and make a person approve every risky step.
2 min read#Security updates#App securityCritical Veeam Backup flaw: update to 13.1.2 or 13.0.3
A critical flaw in Veeam Backup & Replication lets an unauthenticated attacker bypass authorization on the CDP Coordinator Service. The fix is in 13.1.2 and 13.0.3.
4 min read#App security#Web developmentHow to check your session cookie: HttpOnly, Secure, SameSite
Your session cookie is the user's pass into your site. Three attributes on the Set-Cookie line decide whether a stray script, a plain connection or another site can use it, and you can check them in five minutes.
2 min read#App security#Security updatesdecode-uri-component: one request can stall Node, update to 0.5.1
decode-uri-component up to 0.5.0 takes quadratic time on malformed input, so one request of about 224 KB can block the Node.js event loop for about 20 seconds. The fix is in 0.5.1.
2 min read#App security#Web developmentVue I18n XSS: escapeParameter misses srcdoc, update to 11.4.14
Vue I18n with escapeParameter sanitizes translations but does not handle the iframe srcdoc attribute, so a translation rendered with v-html can run script on your site. The fix is in 11.4.14.
2 min read#App security#Security updatesAuthlib flaw: an empty signature list passes any JWS, update to 1.9.0
Authlib up to 1.8.0 accepts a JWS in JSON form with an empty signatures list and returns its payload as verified, with no check and no key. The fix is in 1.9.0.
3 min read#App security#Web developmentbetter-auth before 1.7.7: an email is enough to take over an account
A critical better-auth flaw lets an attacker who knows a user's email open a session in their account when Magic Link and OAuth sign-in are both on. Fixed in 1.7.7, with interim config workarounds.
3 min read#Security updates#App securityIs your Umbraco site at risk? One link can hand over an admin session
On October 27 Umbraco published seven security advisories. The worst is a chain that hands a back-office session to an attacker when a signed-in user opens his link. Fixed in 17.7.2 and 18.2.2.
3 min read#App security#AIMLflow server without login? Two flaws read files and run code
Three MLflow security advisories were added to GitHub's database on October 27: code execution and file reads on a server without login, and LLM provider keys written into traces. Fixed in 3.17.0.
4 min read#Security updates#App securityEvents Manager 7.4.11 fixes 9 flaws, one leaks other bookings
On Oct 25 Events Manager shipped 7.4.11 and Pro 3.9.8: nine security issues found by three researchers in the first days of its Security Hunt, from unauthenticated disclosure to booking takeover. Update before the details go public.
4 min read#Security updates#App securityPostiz 2.25.3: a 9.9 flaw lets any registered user seize your org
On Oct 24 Postiz released 2.25.3 to close two critical flaws: one, scored 9.9, lets an ordinary user forge login, invitation and password-reset tokens; the other reads server files. Update, then rotate the token secret.
4 min read#Security updates#App securityaBlocks plugin: an 8.8 flaw lets a Contributor become Editor
aBlocks versions up to 2.17.0 have an 8.8 flaw that gives a Contributor a full Editor session. Update to 2.18.0, the latest version, and review your Editor accounts.
7 min read#Security updates#App securitySelf-hosting Nextcloud? The Collabora flaw is now on CISA's KEV list
CISA added CVE-2026-110447 to its KEV list: unauthenticated command injection in Nextcloud's built-in Collabora app. Disabling it is not enough: update to 26.4.303 or remove it.
3 min read#Security updates#App securityPatched PHP2Shell? PHP warns of a new flaw, closed with one line
Two days after the PHP2Shell patches, PHP published an informational advisory for CVE-2026-115560: a new RCE path the Oct 21 releases don't fix. Few are affected, and one config line closes it.
5 min read#Security updates#App securitySelf-hosting GitLab? A 10/10 flaw runs code without a login
On October 21, 2026, GitLab fixed CVE-2026-110264, a 10.0 flaw that reaches every version from 7.0. If you upgraded on October 12, you still need 19.5.1, 19.4.3 or the fixed release for your branch.
4 min read#Developer tools#App securityCopilot features you never set are turning on: check by October 26
Since October 22, 2026, GitHub has been giving Copilot Business and Enterprise features left Unconfigured the value of the global default. If nobody picked a value, they turn on. Open AI Controls and decide before the rollout ends on October 26.
11 min read#App security#Security updatesPHP2Shell: two core PHP flaws a WordPress update alone won't fix
PHP2Shell is two flaws in PHP itself, not in WordPress. The fix is PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 or newer, or a distribution package with the fix. Update it or ask your host today.
11 min read#Security updates#App securityNGINX flaws, October 2026: does your nginx.conf leave you exposed?
NGINX 1.30.6 and 1.31.7 fixed five vulnerabilities on October 14, 2026, and each one has a config that opens it up. nginx -T with grep catches most of their patterns, and upgrading fixes all five.
12 min read#App security#WordPressStolen UpdraftCentral keys: is your WordPress site backdoored?
An attacker took UpdraftCentral keys from the company and used them to plant malicious plugins on WordPress sites. Update UpdraftPlus to 1.26.13 or later, delete the key by hand, and check plugins and accounts.
12 min read#App security#PrivacyHow did a plain ad put spyware on Al Jazeera devices without a click?
According to Citizen Lab, ads bought by Discover-Tech asked a server whether the device was a target, and only the target got code. That is how at least 45 devices at Al Jazeera were targeted with Candiru spyware.
11 min read#AI#Developer toolsAI Scan and Claude Code Review: do they review PHP, and at what cost?
GitHub's AI Scan scans PHP code in pull requests and uses credits even on a public repository. Claude Code Review has no official list of languages, and it's billed by tokens.
