Our paywall was a CSS class: moving a free-plan limit to the server
HireGPS reads a CV against a target role the way a recruiter would: a score out of 100, a decision (Shortlist, Hold or Reject) and the risks behind it, each with what to fix. The free plan shows the first three risks. Th
HireGPS reads a CV against a target role the way a recruiter would: a score out of 100, a decision (Shortlist, Hold or Reject) and the risks behind it, each with what to fix. The free plan shows the first three risks. The rest are blurred, with an "Unlock full report" button.
A few days ago we found out that the blur was the whole paywall.
How we found it
We weren't looking for a security bug. We were checking something smaller: on one test CV, the risk that caused a Hold decision was the fourth risk, so a free user saw "held because the CV doesn't meet a requirement the posting marks as required" without seeing which requirement.
While tracing where the free plan picks its three risks, the answer turned out to be: in a React component.
// entitlements.ts
// FREE_RISK_LIMIT is a presentation cut, not a server one.
const visible = allRisks.slice(0, FREE_RISK_LIMIT);
The comment was honest. The API returned every risk, with its name, explanation, fix and evidence, to every user. The component showed three and blurred the rest. Anyone who opened the network tab could read the full report.
Our MCP server, the one AI assistants connect to, did the same cut on the server. So the same rule existed twice, in two languages, and only one of them was real.
Every path, not just the obvious one
The obvious fix is "cut the list in the analysis endpoint". The useful exercise was listing every path the data took to the browser first:
-
GET /analyses/{id}returned the stored result with no plan check at all. - The web app's backend proxy forwarded that response untouched.
- The route that runs a new analysis returned the full risk list in its own response.
- The page passed the raw result object into a client component, so it ended up in the page payload too.
Cutting only the first path would have left three others open. So the cut moved to one shared function on the backend, and every response goes through it:
- Free gets the first three risks (after suppressed risks are removed), and a count of the hidden ones.
- For hidden risks, the response contains no name, explanation, fix, evidence, rule code or detection fields. Only a count and a category summary, which is what the locked rows on screen already showed.
- If the plan can't be read, the user is treated as Free.
- The web app and the MCP server call the same function, so they can't drift apart again.
The screen didn't change. Same three risks, same "Active risks 5", same blurred rows. The blurred rows are now drawn from a number instead of from the hidden text.
The leaks you only find after the obvious fix
This is the part worth writing down. Once the list was cut, hidden risks still leaked through text that mentioned them:
A summary rule that names other risks. One rule fires when several serious risks stack up, and its explanation lists them by name. On Free, that sentence named risks the user wasn't supposed to see. It now names only the visible ones and counts the rest: "β¦Single Unexplained Gap, Language Shortfall and 2 more."
Rule codes in badges. The rewrite suggestions carried small badges with the code of the risk each change addressed. No names, but our methodology page publishes the code-to-name list, so a code is a name with one extra step. Codes of hidden risks are now stripped too.
Free-text written by a model. Rewrite explanations are generated text, and in one stored rewrite the explanation mentioned a hidden risk by name. The same name-to-count rule now runs over explanations, tips and confidence notes, but never over the user's own CV text.
A "since your last analysis" panel. It compared two analyses and listed risks that closed or appeared. On Free, a closed risk could be one the user had never been shown. If either analysis has hidden risks, the panel is now hidden on Free.
A client that counted. Our mobile client showed "See all N" using the length of the risk list. After the change it would have shown 3 instead of 5. It now adds the hidden count. Not a leak, but the same change breaking something quietly.
An assistant that answers from absence. We later added an AI assistant that can read a user's analyses. The model never receives hidden risks, so it can't leak them. But in testing, a free user asked "is risk X flagged on my CV?" and the assistant said no. That was wrong: it didn't know. Absence of data isn't a negative answer. It now says the free plan shows only the first three risks, so it can't tell.
How we test it
Two kinds of tests, both permanent:
- Search for the secret. For a fixture analysis, collect every value that belongs to a hidden risk: names, explanation text, fixes, evidence and codes. Then search the full Free response, as a string, for each one. Any hit fails the build. We also search for the visible values, to prove the search works.
- Break it on purpose. Remove the cut, or one of the text filters, and check that the tests go red. A test that stays green when the protection is gone isn't testing the protection.
And one live check after deploy, against production, through the same proxy the browser uses: a temporary free account, a real analysis, the same string search, then the account and its data deleted.
What we didn't change
A user's data export still contains the full result. Access to your own data isn't a plan feature, and a paywall shouldn't decide what someone can request about themselves.
What I'd tell someone building a freemium product
- If the client receives it, the user has it. Blur,
display: noneandslice()are design, not access control. - List every path the data takes before fixing the first one you see.
- After you cut the list, search for the secret everywhere else: summaries, codes, generated text, diffs between versions.
- Put the rule in one function and make every surface call it.
- Teach anything that answers questions, human-written or model-written, the difference between "no" and "I can't see that".
If you want to see what the free plan shows now, the free analysis takes about a minute, and the methodology lists every rule we mentioned here.
Earlier posts in this series: shipping a remote MCP server with its own OAuth 2.1 server and hardening it with two scanners, a spec change and a kill switch.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.