Last updated: April 29, 2026
Why this module. Old API versions are where security debt accumulates. v1 was insecure by 2019 standards; it’s still serving 5% of traffic in 2026 because retiring it requires customer coordination. Most teams underestimate the security cost of supporting old versions.
Versioning patterns
- URL versioning —
/v1/usersvs/v2/users. Visible, easy to route. Most common. - Header versioning —
API-Version: 2. Cleaner URLs; harder to debug. - Subdomain —
v1.api.example.com. DNS-driven; allows independent infrastructure.
Why old versions accumulate vulns
- Patches go to current version first; old versions get backports later (or never).
- Auth library upgrades break old version contracts; they stay on old library.
- Documentation out of date; engineers fear changing what they don’t understand.
- Long-tail clients can’t migrate (mobile apps with old install base).
Deprecation lifecycle
- Announce — 6-12 months notice. Add
Deprecation: trueresponse header. - Migrate — proactive support for migrating clients.
- Sunset header —
Sunset: Sat, 1 Jul 2026 00:00:00 GMT. RFC 8594. Tells clients when API stops working. - Throttle — gradually reduce rate limits on old version.
- Read-only — disable mutating endpoints first.
- Disable — return 410 Gone. Keep that response for at least 1 year.
Security-driven deprecation
If you find a critical vuln in old version that you can’t patch (architectural):
- Compress the timeline (1-3 months instead of 6-12).
- Force-migrate where contractually possible.
- Communicate transparently — security context helps customer urgency.
Defender’s checklist
- Versioning strategy documented.
- Each version has documented EOL date.
- Security parity across active versions — same vuln must be patched on all.
- Deprecation/Sunset headers used.
- Quarterly review: can we retire any version?
Module Quiz · 6 questions
Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.
Custom team training + practitioner advisory
Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.