Skip to main content
LowSecretsOWASP A07:2021CWE-798

How to fix: New Relic browser key in source

New Relic browser license keys (NRBR-*) are shipped in client JS to report RUM data. They are scoped by allowlist but still leak account info.

Why it matters

New Relic browser keys are intentionally public for RUM collection but an unrestricted key lets any site submit events billed to your account. Exposed server-side ingest keys (different from browser keys) would allow an attacker to inject fake metrics and suppress real alerts.

New Relic browser license keys (NRBR-*) are shipped in client JS to report RUM data. They are scoped by allowlist but still leak account info.

How to fix it

  1. 1Restrict the browser key by hostname allowlist in New Relic Account Settings
  2. 2Ensure server-side ingest keys (different from browser keys) are never shipped to the browser
  3. 3Rotate periodically and audit usage for unexpected event sources

Code examples

Restrict browser key by hostname (New Relic UI)

bash
# New Relic browser keys are restricted via the UI, not via API
# Go to: New Relic → Account Settings → Browser Keys → Edit → Add Allowed Hosts
# Allowed hosts: yourdomain.com, *.yourdomain.com

# Verify the key is scoped correctly:
curl 'https://api.newrelic.com/v2/browser_apps.json' \
  -H 'X-Api-Key: YOUR_INGEST_KEY'

References

Detected automatically by VulnRadar. The check id is secret-newrelic-browser-key, stable across every scan so you can filter or diff on it.

See every secrets check

Questions

How severe is New Relic browser key in source?
VulnRadar rates this low severity in the secrets 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 secret-newrelic-browser-key, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does New Relic browser key in source map to?
It maps to CWE-798. In the OWASP Top 10 it falls under A07: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.

Propose a checkHow a check is built

Scan your own site for new relic browser key in source

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: New Relic browser key in source | VulnRadar