Cyber Security News

Hackers Exploit JavaScript & CSS Tricks to Steal Browsing History

The web browsing history feature, designed to enhance user convenience by styling visited links differently, has inadvertently created a privacy vulnerability.

Hackers have exploited this feature, using JavaScript and CSS techniques to deduce users’ online habits, revealing a concerning loophole in digital privacy.

Browsers use the :visited CSS pseudo-class to style visited links differently from unvisited ones, enabling users to visually distinguish sites they’ve visited. However, attackers have turned this visual styling into a side-channel attack vector.

By analyzing variations in link styles—such as color or rendering time—malicious websites can determine which links a user has previously visited.

This privacy breach extends beyond current sessions, leaking browsing data for entirely different domains.

Evolution of Side-Channel Attacks

Over time, attackers have developed increasingly sophisticated methods to exploit this vulnerability. Among these are:

  • DOM Inspection: Directly analyzing CSS properties of anchor elements to check if a link is visited.
  • Timing Attacks: Measuring rendering times to differentiate visited links.
  • Pixel Color Attacks: Detecting subtle color changes, even when mitigations are in place.
  • Renderer Exploits: Advanced techniques like SpectreJS to extract internal data about visited links.

Such methods allow hackers to infer sensitive browsing behaviors, potentially exposing details about users’ health concerns, finances, or political views.

This opens doors to targeted advertising, enhanced browser fingerprinting, and even precise phishing attempts.

Research highlights the alarming potential for browser history to act as a digital fingerprint. Studies have shown that up to 97% of users have unique browsing patterns, making histories nearly as stable and identifiable as biometric data.

Further large-scale telemetry studies confirmed this figure at 99%, underlining the risk of deanonymization and profiling.

These findings drew attention from privacy regulators, including the GDPR, which regards browsing history as personal data.

Legacy Fixes Fall Short

Despite mitigations introduced in 2010—such as “lying” about visited style queries and limiting CSS properties for :visited links—the issue remained unresolved. These defenses were complex and often insufficient to thwart advanced techniques.

Now, the browser landscape is poised for a transformative change. A newly proposed approach, partitioned visited link history, promises to fix this vulnerability definitively.

Instead of maintaining a global list of visited links, browsers will store these records in a triple-keyed partition:

  1. Link URL: The link destination.
  2. Top-Level Site: The domain of the active browsing context.
  3. Frame Origin: The origin of the frame rendering the link.

Under this model, a visited link will only be styled as such if accessed from the same top-level site and frame origin.

For instance, a user’s visit to https://w3.org from https://example.com would not appear as visited when browsing https://malicious-site.com. This ensures privacy isolation and adheres to the web’s same-origin policy.

The new partitioned model not only protects against cross-site history leaks but also aligns with modern data protection regulations, setting a precedent for other browsers to follow.

Privacy engineers and users alike can look forward to a web that prioritizes security without compromising usability.

Find this News Interesting! Follow us on Google News, LinkedIn, & X to Get Instant Updates!

Divya

Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

1 day ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

1 day ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

1 day ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

1 day ago