The One-Line Config Error That Let a Breach Spread for 11 Days
Archi4 min read
The Setting Nobody Noticed#
When a mid-sized logistics company disclosed a breach last month, the initial report pointed to a phishing email. That was true but incomplete. The real story is a single configuration value that turned a minor credential theft into an 11-day intrusion spanning three internal systems. We spoke with the incident responder who led the investigation. She asked that we not name the company or her firm.
You've said the phishing email was almost irrelevant. Why?
Because the attacker didn't get a password. They got a session token from a browser extension that had been abandoned by its developer two years earlier. The token had a 24-hour lifetime. Without the second mistake, that token would have expired and the attacker would have had one day of access to a read-only dashboard. Instead they got 11 days and administrative access to the internal ticketing system.
What was the second mistake?
A missing timeout on a service account. The dashboard used a backend API that authenticated with a long-lived token stored in an environment variable. That token had no expiry. When the attacker moved from the dashboard to the API, they found a credential that would work until someone rotated it manually. Nobody had rotated it in 14 months.
That sounds like a standard hygiene problem.
It is. The interesting part is why it survived so long. The team had a rotation policy, but it was written for passwords, not tokens. The policy said "credentials must be rotated every 90 days." The service account used a token, and the person who owned that service had left the company. The ticket to rotate it was assigned to a deactivated account. It sat open for 14 months, and nobody noticed because the system kept working.
How did the attacker find the token?
They didn't have to find it. The dashboard's API accepted the token in a query string. That meant the token appeared in the dashboard's own access logs, which were shipped to a third-party analytics service. The attacker, once inside the dashboard, could read the logs. The token was sitting there in plain text.
So the smallest detail is the query string?
It's the combination. A token in a URL is bad. A token with no expiry is worse. A rotation policy that doesn't cover tokens is the reason both survived. Any one of those fixed would have ended the incident in a day. All three together gave the attacker time to move laterally.
What did the lateral movement look like?
The ticketing system had an integration with the HR platform. The integration used the same pattern: a long-lived token in an environment variable. The attacker used the ticketing admin access to read tickets that contained onboarding instructions, which included the HR platform's API endpoint and a sample token format. They didn't need the actual token. They just needed to know the format to guess the next one. The HR platform used a sequential identifier in its token. That's the detail that still bothers me.
Sequential identifiers in tokens?
Yes. The token was a signed payload with a user ID and a timestamp. The signature was valid, but the user ID was an integer that incremented by one. Once the attacker had one valid token, they could enumerate other users by changing the ID and re-signing with the same key. The key was shared across all tenants. That's a design flaw, not a configuration error.
How did they get the signing key?
The key was in the ticketing system's configuration, which the attacker could read as an admin. It was stored as plain text because the integration documentation said to "store it in a secure location." The team interpreted that as "a file on the server." The file was readable by the ticketing application's service account, which the attacker had compromised.
What ended the incident?
A support engineer noticed a spike in API calls from an IP address in a country where the company has no customers. That was day 11. The attacker had been careful, but they got greedy. They tried to export a customer list in a single request. The export endpoint had a rate limit of 100 records per minute. The attacker tried to pull 40,000 records. The rate limiter kicked in, and the support engineer saw the error.
What would you change first?
Expire every token. Not rotate. Expire. A token that lives for 24 hours is a problem you can survive. A token that lives forever is a problem you inherit. The second change is to stop putting credentials in URLs. The third is to treat token rotation as a separate policy from password rotation, with named owners and automated checks. The fourth is to stop using sequential IDs in signed tokens. That last one is a design decision, but it's the one that turned a single stolen token into a list of every user in the system.
Is there a lesson for smaller teams?
Yes. The company had a security team of four people. They had a policy. They had logging. What they didn't have was a way to notice that a ticket had been sitting open for 14 months. The smallest detail that mattered wasn't technical. It was a ticket assigned to a deactivated account. A monthly report of stale tickets would have caught it. That's a spreadsheet, not a product.
What should readers check today?
Look for service accounts with tokens that never expire. Look for tokens in query strings. Look for rotation policies that mention passwords but not tokens. And look for tickets assigned to people who no longer work there. The technical fixes are straightforward. The organizational fix is the one that takes discipline.
More articles