Teams should treat HAR files as sensitive artefacts and scrub them before any external sharing. The safest approach is to remove cookies, passwords, authorization headers, query parameters, JWT signatures, and sensitive JSON body fields, then encrypt the sanitized file. Where possible, use reusable templates so the same redaction rules are applied consistently across support workflows and customer issue investigations.
What support teams should remove before a HAR file leaves the organisation
A HAR file is a browser trace, not a harmless attachment. It can capture authentication material, session state, request URLs, and application payloads, so the sharing decision should start with redaction, not with transport. The practical goal is to preserve enough detail for debugging while stripping anything that could replay a session, reveal account state, or expose customer data.
The safest redaction set is broader than many teams expect. Cookies, passwords, authorization headers, bearer tokens, query parameters, JWTs, and sensitive JSON body fields should be removed or masked before the file is exported externally. Where a field is not needed to reproduce the issue, omit it. Where it is needed, preserve only the minimum structure required for diagnostics.
Support workflows benefit from a repeatable template because ad hoc redaction is where mistakes happen. A consistent sanitization checklist reduces the chance that one engineer leaves a token in a header while another removes only obvious secrets from the body. Reusable templates also make it easier to train frontline support staff and to review whether the same scrubbing rules are being applied across incidents and customers.
How to keep the file useful after sanitisation
Sanitising a HAR file is not only about deletion, it is also about preserving diagnostic value. Keep timestamps, request paths when they are not sensitive, status codes, timing data, and enough response context to reproduce the failure. If the problem can be described without a full body or complete query string, drop those elements rather than trying to selectively redact them later.
When teams scrub HAR files manually, they should assume the first draft is incomplete. The safest review pattern is to inspect both headers and bodies after sanitisation, because sensitive material can be embedded in nested JSON, URL parameters, or copied into custom headers by the application itself. If the file still contains anything that could authenticate a user or identify a tenant, it is not ready to share.
Encrypt the sanitised file before sending it externally, and use a delivery method that matches the sensitivity of the issue. If the recipient only needs a short-term diagnostic artefact, prefer a controlled transfer path with expiration or access limits rather than a long-lived public link. The sharing method should be treated as part of the sanitisation process, not as an afterthought.
Where HAR files most often go wrong in practice
The most common failure mode is assuming that “internal use only” means “safe to forward.” HAR files often leave development and support workflows because they are convenient evidence, and that convenience is exactly why they are dangerous. A single unsanitised export can expose active sessions, customer identities, or API access paths to anyone who opens the attachment.
Another frequent problem is partial redaction. Teams sometimes remove obvious passwords but leave session cookies, bearer tokens, or signed request parameters intact. In practice, those values can be just as sensitive as a password if they still authorise access. The issue is larger when the HAR file came from a support session or from a customer environment where the same artefact may contain multiple users or tenants.
Risk and Threat Considerations
Unsanitised HAR files create a direct exposure path because they can contain replayable secrets and authenticated request details. If a file is shared outside the organisation, an attacker or unintended recipient may be able to reuse the captured material before the session expires or the credentials are rotated.
Failure mechanism: Browser traces preserve cookies, tokens, headers, and request bodies in a form that is easy to copy and reuse, so a single missed field can become an account takeover or tenant access issue.
Impact: Exposure can lead to session hijacking, unauthorised API use, customer data disclosure, and a much wider support incident if the same artefact is forwarded to multiple parties.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 addresses the attack surface, OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V14 — Data Protection | HAR sanitisation protects sensitive request and response data before external sharing. |
| Recommendation — Remove secrets and sensitive fields before exporting traces or logs. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | HAR files may contain authenticators and session material that must be controlled or rotated after exposure. |
| Recommendation — Treat exposed session material as authenticators and rotate it promptly. | ||
| ISO/IEC 27001:2022 | A.5.14 — Information transfer | Sharing HAR files externally is an information transfer activity that needs defined handling rules. |
| Recommendation — Apply transfer rules that require redaction and controlled external disclosure. | ||
| CIS Controls v8 | CIS-3 — Data Protection | HAR files can expose sensitive data and need protective handling before release. |
| Recommendation — Protect exported artefacts with redaction and encrypted transfer. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | HAR files often leak tokens, cookies and headers that function as secret material. |
| Recommendation — Redact leaked secrets from support artefacts before sharing them. | ||
Practitioner Guidance
What to verify: Check the exported HAR for secrets in both top-level and nested fields, then confirm that the final file no longer contains any value that could authenticate a user, tenant, or service. If the issue under investigation depends on a specific request header or parameter, preserve only the minimum non-secret form needed for analysis.
Decision rule: If a HAR file must leave your control, treat sanitisation and encryption as mandatory, and treat external sharing as incomplete until someone has reviewed the file after redaction. When the review cannot be done reliably by the person who captured the file, escalate it to a second reviewer before release.
What practitioners underestimate: The hardest part is not removing one obvious token, it is building a workflow that consistently catches every capture path, every body field, and every replayable session artefact. Practitioner takeaway: the goal is to make the trace diagnostically useful while making credential reuse impossible.
Related resources from NHI Mgmt Group
- Guide: HAR Files and Session Token Leakage Guide
- How should security teams handle HAR files that may contain authentication material before sharing them externally?
- How should security teams sanitize PDF documents before sharing them with users or systems?
- Why do HAR files create a high-risk data exposure problem in modern support workflows?
- Who is accountable when sensitive data in HAR files is exposed during support handling?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org