One Math Function Just Made Every Chrome Browser Easier to Fingerprint. Here's Why That Matters for Your Business
Starting with Chromium 148, a single call to Math.tanh can reveal whether a visitor is running Windows, macOS, or Linux, regardless of what their browser claims. It's a useful case study in how small engineering decisions ripple into fingerprinting, bot detection, and automation strategy.
A story making the rounds on Hacker News this week caught my attention, and it's worth unpacking for anyone running automation, scraping, or bot detection in their business.
The short version: as of Chromium 148, calling Math.tanh(0.8) in JavaScript returns slightly different bits depending on the operating system underneath the browser. One function call, and a detection script knows whether you're actually on Windows, macOS, or Linux, no matter what your user agent says.
What Actually Changed
Chrome's JavaScript engine (V8) used to ship its own bundled math implementation for Math.tanh. In version 148, the team swapped it for std::tanh, which calls the host operating system's math library directly.
That sounds harmless until you remember that every OS ships a different math library:
- Linux uses glibc
- macOS uses Apple's libsystem_m
- Windows uses UCRT (ucrtbase.dll)
Each vendor makes slightly different accuracy-versus-speed tradeoffs in how they approximate transcendental functions. IEEE 754 doesn't require perfectly rounded results, so the implementations agree on almost every input and diverge on just enough of them to classify the OS. A detector only needs a small lookup table of known inputs and outputs.
Chrome 147 and earlier don't leak this signal. Chrome 148, 149, and 150 do.
And it goes beyond one function. CSS trigonometric functions like sin() and cos() call the host math library from the layout engine, and Web Audio on macOS leans on Apple's Accelerate framework. The surface area is bigger than a single API.
Why This Is Hard to Fake
Most spoofing stacks focus on the obvious signals: user agent strings, screen dimensions, WebGL renderer names, canvas fingerprints. Math output is a different animal. It's deterministic, costs almost nothing to probe, and until now it wasn't on anyone's radar.
If your automation claims to be Chrome on Windows but your tanh output matches glibc, you've just told the detection system you're running headless Chrome on a Linux server. That's the setup for the vast majority of scraping and automation infrastructure.
The fix isn't trivial either. The team that published this research had to reverse-engineer the vendor math libraries, reproduce their algorithms bit-for-bit with explicit fused multiply-add operations, and compile with specific flags to keep the output deterministic. On Windows they went as far as mapping the genuine UCRT library into memory and calling it directly. This is not a weekend patch.
What This Means If You Run a Business
Depending on which side of the detection game you're on, this cuts two ways.
If you rely on scraping or browser automation for pricing intelligence, lead generation, market research, or QA testing, expect some of your pipelines to start failing over the coming months as detection vendors adopt this signal. Chromium-based browsers update fast, which means the population of "real" browsers exhibiting this behavior grows quickly, and mismatches become obvious.
If you're defending a platform against bots, credential stuffing, or content theft, you just got a cheap, passive signal that most attackers haven't accounted for yet. There's a window here where this check catches a lot of traffic that sails past conventional fingerprinting.
Either way, the lesson is the same one I've seen play out over 22 years of building software: the systems you depend on shift underneath you, often through changes nobody announces as breaking. The V8 team didn't set out to create a fingerprinting vector. They made a reasonable engineering decision about a math function, and the downstream effects landed on everyone running automation at scale.
Practical Takeaways
A few things worth doing this quarter if this touches your business:
- Audit your automation stack's browser versions. Know whether you're on the affected Chromium builds and whether your target sites use detection vendors likely to adopt this signal.
- Stop treating anti-detection as a one-time setup. Fingerprinting surfaces evolve with every browser release. Budget for maintenance, or work with someone who tracks this space.
- If you're building AI agents that browse the web, this applies to you too. Agentic systems that drive real browsers inherit all of these fingerprinting concerns, and most agent frameworks ignore them entirely.
- If you're on the defense side, ask your bot-mitigation vendor whether they're incorporating math-library signals. If they haven't heard of this, that tells you something.
I build AI agents and automation systems for a living, and cases like this are exactly why I push clients toward architectures that assume the environment will change. Hardcoded assumptions about how browsers behave have a shelf life measured in browser release cycles, which for Chrome is about four weeks.
If your business depends on web automation, data collection, or bot detection and you're not sure how exposed you are, it's worth a conversation before the detection vendors get ahead of you.
