For Ségur wave 2, the French Digital Health Agency (ANS) requires a penetration test carried out by a PASSI-qualified provider, on its own form built on OWASP. The rule is strict: a single high-severity non-compliance is disqualifying, and at most 10 medium-severity non-compliances are tolerated.
In our penetration tests of healthcare software, five families of vulnerabilities keep coming back, even at mature vendors. None of them requires a six-month project: they are configuration and access-control flaws, fixed in a few sprints. Here is what we find, and what to fix before the test.
1. Poorly configured JWTs
The JSON Web Token often serves as the session token between the front end and the API. With Pro Santé Connect, a second token comes into play: the OpenID Connect ID token returned after e-CPS or CPS authentication. Both are still too often poorly verified:
- Algorithm not verified:
alg: noneaccepted, or a library that trusts the token header — an attacker signs their own token. - Weak or default secret, sometimes committed in plain text to the repository.
- No expiration (or a one-year expiry), and no revocation: the “log out” button does nothing server-side.
- Token stored in
localStorage: stolen by any XSS. - Token passed in the URL: it leaks into logs, the
Refererheader and browser history. issandaudnot verified server-side: a token issued for another application from the same vendor is accepted.- Pro Santé Connect callback poorly checked:
stateandnonceparameters missing or not verified, ID token signature not validated. - Reusable refresh token, without rotation: one theft = long-lasting access.
What to do: algorithm enforced server-side (never read from the token header), asymmetric keys (RS256/ES256) or, with HMAC, a random secret of at least 256 bits stored outside the code. Short expiry (15 min) and a rotating, revocable refresh token. Storage in an HttpOnly, Secure, SameSite cookie. Systematic server-side validation of iss, aud and exp, of state and nonce on the Pro Santé Connect callback, and never a token in a URL.
2. Poorly controlled API permissions
This is the most serious vulnerability we find in healthcare software, because it directly exposes patient records:
- IDOR / BOLA:
/api/patients/12345— any authenticated user opens the record by simply changing the ID, because the API never checks that the user is entitled to it. - Mass assignment: the front-end sends the whole object back, and a modified
roleoris_adminfield gets saved. - Access control only on the front end: the button is hidden, but the endpoint checks nothing.
- Forgotten admin endpoints:
/api/admin/export,/debug, exposed Spring Boot Actuator endpoints (/actuator/env,/actuator/heapdump). - User enumeration: “user not found” vs “wrong password”.
What to do: systematic server-side authorization (ownership check on every call, never just a role), strict request schemas (allow-list of modifiable fields), review of all sensitive routes, generic error messages.
3. Technical information leaks
They do not directly expose data, but they hand an attacker the full map of your system:
- Detailed stack traces in production (framework not set for prod).
- Verbose headers:
Server,X-Powered-By, framework version. - API documentation exposed in production:
/swagger-ui,/v3/api-docs,/api-docs. - Sensitive files deployed:
.git/,.env,*.bakbackups. - Published sourcemaps (
.js.map): the front-end source code becomes readable. - Overly permissive CORS:
Access-Control-Allow-Origin: *with credentials, or wildcard origins. - Directory listing enabled, verbose error messages (SQL queries, file paths).
What to do: generic error page (details go to server logs only), cleaned-up headers with Content-Security-Policy and HSTS, API docs disabled in production, clean CI deployment (excluding .git and .env), sourcemaps removed from the production build, CORS restricted to your exact origins.
4. Poorly protected health data
Specific to the healthcare sector, and governed by the PGSSI-S, the health information systems security policy published by the ANS:
- Logs containing clinical data (patient name, reason, treatment) without encryption or access control.
- Unencrypted exports, download links that are too long or predictable.
- Demo accounts active in production, with default passwords.
- No logging of record access: who consulted which record, when. This is what the PGSSI-S accountability framework (référentiel d'imputabilité) covers.
- No encryption in transit (internal HTTP) or at rest, keys hard-coded in the code.
- Unencrypted backups, uncontrolled retention.
What to do: minimize data in logs, encrypt systematically in transit and at rest, manage secrets in a vault, disable test accounts in production, log access to patient records, document a retention policy.
5. A poorly controlled scope
Sometimes the software itself is well secured, but its ecosystem is not:
- Forgotten subdomains (staging, old versions) exposed on the Internet.
- Test environments holding real health data.
- Vulnerable dependencies (known CVEs): a simple dependency scan reveals them, and so will the auditor.
- Test cloud accounts with overly broad rights, access keys in plain text in scripts.
What to do: inventory of exposed assets (regular mapping), synthetic data only outside production, dependency scanning in CI, review of cloud IAM rights.
The pre-test checklist
- Tokens: algorithm verified, strong secret, short expiry, effective logout revocation.
- Permissions: server-side authorization on 100% of sensitive endpoints, tested for IDOR (ID swapping).
- Errors: no stack trace in production, cleaned headers, API docs disabled.
- Health data: encrypted in transit and at rest, record access logged.
- Demo and test accounts disabled in production.
- Scope: up-to-date inventory, staging environments not exposed on the Internet.
- Dependencies up to date, with no known critical CVE.
- List of already-known vulnerabilities ready to share with the auditor, as the ANS asks.
- Calendar: test, fixes and retest completed before the Convergence filing deadline. The signed form must be less than one year old.