medium · M8 · MASVS-CODE-2 · PTKD-API-VERBOSE-ERROR
Server error leaks a stack trace
A server response body contained a stack trace or framework error, exposing internal paths, library versions, and query structure that help an attacker.
How it is exploited
A server response returned a raw stack trace or framework error. An attacker reads internal file paths, library versions, and query structure from it, then tailors an exploit (for example, confirming a SQL error to build an injection).
Why it matters
Information disclosure that accelerates targeted attacks and reveals your stack to anyone who can trigger an error.
How to fix it
- Return generic error messages to clients; log the details server-side only.
- Disable debug/verbose error pages in production configuration.
Does your app have this?
PTKD checks your build or your source project for PTKD-API-VERBOSE-ERROR and every other check in this knowledge base.
Scan your appReferences
Related checks (M8)
- JavaScript obfuscation in the build
- Export compliance (ITSAppUsesNonExemptEncryption) not declared
- HealthKit app that also ships an ads SDK
- Hardcoded unlock or promo code
- Purchases SDK configured with an empty or test key
- Purchase screen falls back to made-up prices or 'coming soon' text
- False-urgency copy on a purchase screen
- Hardcoded price on a purchase screen