Medium severityJavaScript / TypeScriptSensitive Data ExposureMEDIUM confidence
PII PHI In Logs
Personally identifiable or protected health information (PII/PHI) is written to a log sink.
Standards mapping
- CWE
- CWE-359: Exposure of Private Personal Information to an Unauthorized ActorCWE-532: Insertion of Sensitive Information into Log File
- OWASP ASVS
- V8.3.4 (L2)V7.1.1 (L2)
Vulnerable vs. safe
Flagged by this check
console.log(patient.ssn);Passes - the safe pattern
console.log("record processed");Why it matters & how to fix it
Personally identifiable or protected health information (PII/PHI) is written to a log sink. Under HIPAA/PCI/GDPR this data must not be logged in the clear; mask, tokenize, or omit it.
References
Rule ID integsec-js-pii-phi-in-logs - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Sensitive Data ExposureError Stack In Response
- JavaScript / TypeScript - Sensitive Data ExposureSecret In Logs
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data Client Storage
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data In URL Query
- Python - Sensitive Data ExposureFlask Traceback In Response
- Python - Sensitive Data ExposureHardcoded PII Literal