---
title: "CAPEC-472: Browser Fingerprinting"
url: https://radicalnotion.ai/capec/capec-472
type: capec
description: "An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-472: Browser Fingerprinting

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** Low
- **CAPEC catalog version:** 3.9

## Description

An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.

## Prerequisites

- Victim's browser visits a website that contains attacker's Java ScriptJava Script is not disabled in the victim's browser

## Mitigations

- Configuration: Disable Java Script in the browser

## Example instances

The following code snippets can be used to detect various browsers: Firefox 2/3 FF=/a/\[-1\]=='a' Firefox 3 FF3=(function x(){})\[-5\]=='x' Firefox 2 FF2=(function x(){})\[-6\]=='x' IE IE='\\v'=='v' Safari Saf=/a/.\_\_proto\_\_=='//' Chrome Chr=/source/.test((/a/.toString+'')) Opera Op=/^function \\(/.test(\[\].sort)

## Related weaknesses (CWE)

- [CWE-200](https://radicalnotion.ai/cwe/cwe-200): Exposure of Sensitive Information to an Unauthorized Actor

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-541](https://radicalnotion.ai/capec/capec-541) | Application Fingerprinting |

## Frequently asked questions

### What is CAPEC-472?

An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.

### How do you prevent CAPEC-472?

Configuration: Disable Java Script in the browser

### What weaknesses does CAPEC-472 target?

CAPEC-472 exploits one CWE weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor).

### How severe is CAPEC-472?

MITRE rates CAPEC-472 as Low severity.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/472.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-472). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
