How to fix: Session-Replay Script Near Unmasked Sensitive Field
A session-replay/analytics script (Hotjar, FullStory, LogRocket, Clarity) was detected alongside a sensitive-looking input field (SSN, credit card) that lacks the vendor's data-exclusion attribute.
Why it matters
The session-replay vendor's servers receive a recording of the raw field value, including any PII or payment data the user types, outside of your own infrastructure and audit boundary.
Session-replay tools record DOM mutations and (depending on configuration) keystrokes to reconstruct a video of the user's session for support/analytics purposes. They mask password-type inputs by default, but do not know which of your custom-named fields hold SSNs or card numbers unless you mark them explicitly.
How to fix it
- 1Add the vendor's exclusion attribute (e.g. data-hj-suppress, fs-exclude, data-clarity-mask) to every field that can contain PII or payment data.
- 2Prefer an allowlist-based masking configuration over a denylist so newly added fields are masked by default.
- 3Route payment collection through an iframe-hosted vendor field (Stripe Elements, etc.) that the replay script cannot read into.
Code examples
Exclude a sensitive field from Hotjar recordings
<input type="text" name="credit_card_number" data-hj-suppress />References
Detected automatically by VulnRadar. The check id is session-replay-unmasked-sensitive-field, stable across every scan so you can filter or diff on it.
More content checks
- MediumPotential Open Redirect Parameters
- HighDirectory Listing Appears Enabled
- MediumSensitive File References Detected
- HighPotentially Outdated JavaScript Libraries
- Inforobots.txt Present - Review Manually
- InfoCMS / Technology Fingerprinting
- MediumPotentially Dangerous Inline JavaScript
- LowServer version disclosed in response header
Questions
- How severe is Session-Replay Script Near Unmasked Sensitive Field?
- VulnRadar rates this high severity in the content category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id session-replay-unmasked-sensitive-field, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Session-Replay Script Near Unmasked Sensitive Field map to?
- It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.