Join our Newsletter — 33% off our NHI Course
Home Glossary Cyber Security XHR Requests
Cyber Security

XHR Requests

← Back to Glossary
By NHI Mgmt Group Updated September 14, 2026 Domain: Cyber Security

XHR requests are browser network calls used by web applications to exchange data with backend services. They often represent the most useful API traffic when generating specifications from a live session because they capture application interactions rather than page assets, media, or unrelated noise.

Expanded Definition

xhr requests are browser-initiated network calls that web applications use to exchange data with backend services without a full page reload. In practice, they are the request traffic most likely to reveal the real application workflow, because they carry the data interactions behind buttons, filters, forms, and dynamic content updates.

For glossary and reverse-engineering work, XHR usually matters more than asset loading because it exposes application logic, API shapes, and state changes. That is why analysts often separate XHR traffic from images, scripts, fonts, and other page resources when reconstructing a live session. The boundary to watch is that XHR is a browser transport pattern, not a security feature or API standard in itself. It is one way an application reaches backend endpoints, and the security question is usually about what those endpoints allow, return, or trust.

Definitions in tooling and browser documentation are generally consistent, but practitioners sometimes blur XHR with all API traffic. In reality, modern sites may use fetch() and related mechanisms alongside XHR-style calls, so the useful working definition is broader than the historical name suggests.

For protocol background, MDN’s XMLHttpRequest reference is the clearest baseline for how the browser object behaves.

Examples and Use Cases

XHR requests show up in the places where browser interaction becomes application data exchange. They are often the highest-value traffic when building a specification from a live session or checking whether the front end is masking backend behaviour.

  • Capturing the JSON request that loads a customer search result after a filter change.
  • Observing an authenticated call that saves profile settings without reloading the page.
  • Reviewing a session replay to identify which endpoint powers a dashboard widget or table refresh.
  • Comparing requests before and after a UI action to infer required parameters, headers, and response structure.
  • Separating functional requests from static content so an inventory or test harness focuses on business logic rather than page assets.

A practical tradeoff is that the most useful XHR calls are often the most stateful ones, which means they can be harder to reproduce cleanly outside the browser. That makes them valuable for analysis, but also easy to misread if you ignore the session context, CSRF behaviour, or authentication state attached to the request.

For a practitioner-focused discussion of the identity and secret handling that often surrounds browser-to-API traffic, the Ultimate Guide to NHIs is useful when the request path depends on machine or application credentials.

Security Implications

XHR traffic is security-relevant because it often exposes the exact API surface an application actually uses, including hidden endpoints, verbose error messages, and parameter patterns that are not obvious from the UI alone. When teams misunderstand or ignore that traffic, they can miss broken authorization, weak input handling, or overexposed data returned to the browser.

Mismanaging XHR also affects testing and monitoring. If developers only inspect rendered pages, they may overlook backend calls that perform sensitive actions or return more data than the interface displays. That creates a gap between what users see and what the application really permits.

Failure mechanism: attackers and testers alike can inspect browser calls to learn endpoint structure, parameter names, object identifiers, and response fields. If authorization checks are inconsistent across those endpoints, the browser becomes a map of where access control can fail.

Impact: leaked data, unintended state changes, exposed business logic, and broader attack surface for abuse of application workflows.

In practice, the signal that matters most is not the label “XHR,” but whether those requests carry the sensitive operations that define the app’s trust boundary. A single overlooked call can be enough to expose records, tokens, or privileged actions.

Security, Operational and Governance Implications

XHR requests matter operationally because they are often the bridge between user interaction and backend authority. They help teams observe how a browser actually talks to services, which in turn shapes API documentation, test coverage, reverse engineering, and control validation.

That same visibility also has governance value. If a business process depends on browser-driven calls, teams need to know which requests are essential, which are redundant, and which carry sensitive state. The difference affects logging strategy, access review, and incident investigation quality. The broader lesson is that frontend behaviour can hide backend trust decisions, so analysts should trace the request path rather than assume the UI tells the whole story.

Where machine or application credentials are involved, the security concern shifts from simple traffic capture to whether those credentials are issued, stored, and revoked in a controlled way. In that case, the request pattern can reveal whether backend access is tightly governed or merely functioning by convenience. The OWASP Non-Human Identity Top 10 is a useful reference when those request paths depend on non-human access credentials.

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 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-01 — Improper Secrets HandlingXHR traffic often exposes browser-side paths that reveal where non-human credentials are used.
NHI-02 — Excessive PrivilegeXHR calls can surface backend actions whose privileges exceed the UI need.
NHI-03 — Visibility and InventoryXHR analysis helps inventory the live API traffic and dependent machine-access paths.
Recommendation — Inspect XHR-driven workflows for exposed secrets and remove credentials from browser-visible paths. Reduce backend privileges behind browser calls to the minimum required for each action. Map XHR requests to the services they touch and keep an inventory of those dependencies.
CIS Controls v8CIS 6 — Access Control ManagementXHR endpoints often expose the effective access model of browser-backed operations.
Recommendation — Enforce consistent access controls on every browser-reachable endpoint and verify them by testing.
MITRE ATT&CKT1190 — Exploit Public-Facing ApplicationXHR traffic can reveal externally reachable application functions and attack surfaces.
Recommendation — Use observed XHR endpoints to prioritize testing and monitoring of public-facing application paths.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 14, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org