Back to songs

LocalStorage Blues

A rap about what happens when "remember me" becomes "remember everything, forever, in plaintext, for anyone with XSS access."

Based on a true story

This song documents actual vulnerabilities found in production code: plaintext credentials in localStorage, logout functions that didn't clear sensitive data, "remember me" checkboxes that stored PINs permanently, and SSO tickets sitting in client-side storage waiting for XSS exploitation.

These aren't exotic edge cases. They're Tuesday afternoon bugs that should've been caught by tests.


Lyrics

Yeah.
You left the keys where the kids play.
Yeah.
We trusted a box.
It lied.
Listen.

You, you left the keys in the cookie jar, wired to the net
Plaintext on the shelf, like a threat you forget
Click log out - it's still living in dust and regret
Singing LocalStorage blues... Welcome to the threat

Remember me? Nah, remember this - the PIN on display
A ticket to the kingdom, just sitting in play
One XSS line and our secrets betray
We patch tomorrow? Nah - patch today.

I crawled through the DOM like a ghost in the chrome
Found a laundry list of sins they call "home"
Username, pincode, password - parade in a row
Like a party for hackers, they threw us the show

Logout a liar, it winked and it stayed
Cleared the ticket, but the rest? Nah - they played
"Husk mig" a monster, it's hoarding the keys
Permanent memory, like gum on the knees

SSO ticket in clear - a passport for thieves
Give me one little exploit and watch the sleeves leave
CSP missing, headers half-baked
Public Wi-Fi's a puppet - credentials get faked

GDPR knocking, but the door's been ripped
We counting the cost while the logs get skipped
I'm angry but sad - it's a tragic cartoon
We left the safe open and hummed the same tune

[Chorus]

You left the keys in the cookie jar, wired to the net
Plaintext on the shelf, like a threat you forget
Click log out - it's still living in dust and regret
We singing LocalStorage blues... Welcome to the threat

Remember me? Nah, remember this - the PIN on display
A ticket to the kingdom, just sitting in play
One XSS line and our secrets betray
We patch tomorrow? Nah - patch today.

Exploitability high, complexity low
Attack from the network - they already know
No privileges needed, no user to trick
One malicious script and your stack gets picked

I picture the boardroom, champagne gone sour
Lawyers with clipboards, come the midnight hour
"Was it reckless?" they say - no, it's negligence dressed
Security's sleeping, so the zebras get stressed

I spit punchlines with deadlines, the humor a mask
Under the laughs is the job that we didn't do fast
We can swap storage for cookies - HttpOnly, sealed
Session on the server, that's how trust is healed

But the code is a fossil, deployments still run
So I rap you a warning before the damage is done
Imagine a kid on a shared machine
Types in a URL, finds someone's dream

No, this ain't theory - it's a half-built crime
We sell access cheap while we bill them in time
Patch it. Lock it. Don't let it breathe.
Make the logout honest - make it leave.

[Chorus]

You left the keys in the cookie jar, wired to the net
Plaintext on the shelf, like a threat you forget
Click log out - it's still living in dust and regret
We singing LocalStorage blues... Welcome to the threat

Remember me? Nah, remember this - the PIN on display
A ticket to the kingdom, just sitting in play
One XSS line and our secrets betray
We patch tomorrow? Nah - patch today.

[Outro]

(HAA!)
They left the keys where the kids play.
We trusted a box...
...that lied.
Patch today.


The vulnerabilities

This song catalogs real security flaws that tests should catch:

  • Plaintext credentials in localStorage - username, PIN, password stored without encryption
  • Broken logout - cleared SSO ticket but left all other sensitive data
  • "Remember me" storing PINs - permanent client-side storage of authentication secrets
  • XSS-exploitable session tokens - SSO tickets in localStorage instead of HttpOnly cookies
  • Missing CSP headers - no Content Security Policy to prevent injection attacks
  • GDPR violations - sensitive data persisted without consent or proper deletion

Every one of these should have been caught by security tests before deployment. They weren't exotic attacks - they were "inspect element, copy token, win" vulnerabilities.


Want to avoid these bugs?

Check out

Ward #1: Yes, You Can Actually Build Good Software With AI

for a test-driven approach that catches security bugs before they ship.