Skip to content

New requirement proposal (V3): sensitive input fields must be excluded from client-side monitoring and session-recording capture #3395

Description

@anuragnedunuri

Problem statement

ASVS 5.0 requires that defined sensitive data is not sent to untrusted parties (14.2.3), and covers sensitive data at rest on the client (V14.3: DOM cleanup, caching, browser storage). However, there is no requirement addressing the mechanism by which this data most commonly leaks in practice: client-side monitoring, analytics, error-tracking, and session-recording scripts capturing input events before form submission.

These scripts are typically first-party authorized (loaded intentionally, allowlisted in CSP, integrity-checked where applicable), so existing V3 controls do not constrain them:

  • 3.4.3 (CSP) controls which scripts load, not what authorized scripts capture once loaded.
  • 3.6.1 (SRI) verifies integrity of externally hosted static assets; it says nothing about the data-capture behavior of a legitimate, unmodified script.
  • 14.2.3 states the outcome (sensitive data must not reach untrusted parties) but is difficult to verify at the browser layer: egress inspection at submission time misses keystroke-level capture that occurs while the user is typing, and 14.2.3 gives the tester no mechanism-level requirement to test against.
  • 14.3.1–14.3.3 cover data at rest (DOM after session end, caches, browser storage), not live input events.

The result is a well-documented failure class: session-replay and analytics tooling capturing credentials, payment data, and health information from form fields, including from forms the user never submits. Large-scale measurement research has shown session-replay scripts collecting form input before submission from production sites, with vendor redaction mechanisms found to be imperfect in practice, and follow-up research documented inadvertent plaintext password collection by analytics and replay tooling. Notably, the discussion in #1274 (which produced 14.2.3) cited exactly this scenario : telemetry capturing authentication form submissions as plaintext credentials as motivation.

Attack/failure scenario

  1. An application loads a session-recording or analytics script intentionally, from an allowlisted origin, with SRI where applicable. All existing V3 requirements pass.
  2. The script attaches listeners to input events (keystrokes, paste, autofill mutation) across the page.
  3. A user types a password, card number, or health information into a form. The field contents are serialized and transmitted to the vendor's collection endpoint as the user types before submission, and even if the user abandons the form.
  4. Field-masking configuration in the recording tool is absent, incomplete (e.g., masks type="password" but not a custom credential field), or silently degraded.

No malicious script is involved. The application "leaks by configuration."

Proposed requirement

Section: V3.7 (Other Browser Security Considerations), or a new section if preferred.

3.7.x - Verify that input fields which are expected to contain defined sensitive data are excluded from capture by any client-side monitoring, analytics, error-tracking, or session-recording mechanisms in use, including capture of input events (such as keystrokes or paste events) which occur before form submission.

Alternative, shorter wording:

3.7.x - Verify that client-side monitoring or session-recording mechanisms in use do not capture the values of input fields which are expected to contain defined sensitive data, including values entered but not yet submitted.

The phrase "defined sensitive data" is used deliberately to tie into the data classification required by 14.1.1, consistent with how 14.2.3 is scoped.

Proposed level: 2

Session-recording and analytics tooling is ubiquitous in ordinary applications, not only high-assurance ones, and the data at risk (credentials, payment, health data) is the same data 14.2.3 protects at L2 (verified on master as of 2026-08-12). L1 seems too aggressive since verification requires knowledge of which monitoring tools are in use.

How a tester verifies this

  • Configuration review: inspect the masking/exclusion configuration of each recording/analytics mechanism in use against the application's documented sensitive fields (per 14.1.1 classification).
  • Dynamic testing: enter marker values into designated sensitive fields without submitting; inspect network egress and vendor-side session captures for the marker values.
  • Instrumented testing: monitor input-event listener attachment on sensitive fields to confirm exclusion behavior.

This is verifiable with standard browser tooling and does not depend on any specific vendor product.

Relationship to existing requirements (why this is not a duplicate)

Existing Covers Does not cover
14.2.3 Outcome: sensitive data not sent to untrusted parties The pre-submission input-event capture mechanism; browser-layer verifiability
14.3.1–14.3.3 Sensitive data at rest in DOM/caches/storage Live input events during data entry
3.4.3 (CSP) Which scripts may load/execute What authorized scripts capture
3.6.1 (SRI) Integrity of externally hosted static assets Data-capture behavior of legitimate scripts

This proposal is the V3 (mechanism-level, browser-layer) counterpart that makes the 14.2.3 outcome testable for the most common leakage path.

References

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions