Skip to content
Access control Advisory Intermediate CVE-2025-3070

Insufficient validation of untrusted input in Extensions (CVE-2025-3070)

The Chrome content settings API accepted a pattern for a chrome-extension URL, allowing an extension with contentSettings and activeTab permissions to grant itself access to sensitive features like microphone and camera without user consent. An attacker could use this to spy on the user.

Anonymous Follow

Originally disclosed on Chrome VRP

Bounty$1,000 Medium View original
  • Fix shipped in 8.2 years

A chrome extension, with the help of permissions - contentSettings and activeTab, can grant itself access to all the features like geolocation data, microphone, camera etc. without exclusively asking it from the End User.

VULNERABILITY DETAILS

Normally (as per the codebase https://chromium.googlesource.com/chromium/chromium/+/master/chrome/common/content_settings_pattern.cc#288 ), allowed patterns are:

  • [*.]domain.tld (matches domain.tld and all sub-domains)
  • host (matches an exact hostname)
  • a.b.c.d (matches an exact IPv4 ip)
  • [a:b:c:d:e:f:g:h] (matches an exact IPv6 ip)
  • file:///tmp/test.html (a complete URL without a host)

However, the pattern "*://chrome-extension-ID/*" can also be passed as primaryPattern and any contentSetting can be set to allow.
This will be enable the chrome extension calling the method:

chrome.contentSettings.microphone.set({
primaryPattern: '*://chrome-extension-ID/*',
setting: 'allow'
}, function(){});

to gain access to the microphone and act as a spyware.

VERSION
Chrome Version: Tested on v53.0.2785.116 and above [stable]
Operating System: Ubuntu 16.04 (64-bit), Windows 8, Windows 10 (will exist for Mac as well)

The original report as published on the Chromium issue tracker, by Anonymous. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Chrome extensions can request a set of permissions that give them privileged access to browser features. Two of those permissions are contentSettings and activeTab. The contentSettings API lets an extension read and write the browser's content settings, the same per-site preferences a user manages through the settings UI, including which sites may use the microphone, the camera or geolocation. The activeTab permission grants temporary access to the currently active tab after a user gesture.

The report describes a way for an extension holding those two permissions to grant itself access to sensitive device features, geolocation data, microphone and camera among them, without ever asking the end user for that access. The affected component is the Extensions subsystem of Chrome, and the weakness is classified as insufficient validation of untrusted input.

Setup

The researcher tested on Chrome v53.0.2785.116 and above on the stable channel. The operating systems used were Ubuntu 16.04 (64-bit), Windows 8 and Windows 10, and the report notes the behaviour will exist for Mac as well. The only precondition is an installed extension that holds the contentSettings and activeTab permissions.

Finding it

The starting point is the documented set of patterns that content settings accept. According to the codebase, the allowed patterns are:

  • [*.]domain.tld (matches domain.tld and all sub-domains)
  • host (matches an exact hostname)
  • a.b.c.d (matches an exact IPv4 ip)
  • [[redacted]:g:h] (matches an exact IPv6 ip)
  • file:///tmp/test.html (a complete URL without a host)

What the researcher noticed is that the pattern *://chrome-extension-ID/* can also be passed as primaryPattern, and that with it any content setting can be set to allow. That pattern is not in the documented list, yet it is accepted. Because the pattern targets the extension's own origin, the extension can write an allow rule for itself and then use the gated feature as if the user had granted it.

Exploitation

Step 1: set the content setting for the extension's own origin

The extension calls the contentSettings API for the feature it wants, here the microphone, and passes the undocumented pattern as primaryPattern with setting set to allow:

JavaScript
chrome.contentSettings.microphone.set({
 primaryPattern: '*://chrome-extension-ID/*',
 setting: 'allow'
}, function(){});

The primaryPattern value is the key part: it is a URL pattern scoped to the extension's own origin rather than to a web host, and the API accepts it even though it falls outside the documented pattern forms. The setting: 'allow' value writes an allow rule for that pattern. The empty callback does nothing; the effect is the stored setting.

Step 2: use the granted feature

With the allow rule in place, the extension gains access to the microphone. The report states the same approach applies to the other features, geolocation data and camera included, and that the extension can then act as spyware. No user prompt for the permission is shown at any point.

Root cause

The content settings pattern parser is expected to accept only the documented forms: a domain with an optional wildcard subdomain prefix, an exact hostname, an exact IPv4 address, an exact IPv6 address in brackets, or a complete URL without a host. The pattern *://chrome-extension-ID/* does not fit any of those, but it is still accepted as a primaryPattern, and any content setting can be set to allow through it. The validation of the pattern input is therefore insufficient: a scheme wildcard combined with an extension origin passes the check and produces a rule that applies to the extension itself.

The permission model is bypassed because the extension never has to request the sensitive permission from the user; it grants it to itself through the settings API.

Impact

An extension with the contentSettings and activeTab permissions can obtain access to geolocation data, the microphone and the camera without asking the end user, and can use that access to spy on the user. The report frames the microphone case explicitly and states the same mechanism covers the other features. The behaviour was confirmed on Ubuntu 16.04, Windows 8 and Windows 10, and the researcher expects it on Mac as well.

Fix

The report does not describe a fix. The appropriate change follows from the root cause: the pattern parser should reject patterns that are not one of the documented forms, so that a scheme wildcard applied to an extension origin cannot be stored as a content setting rule.

Variants to test

  1. Try other undocumented pattern shapes against the same API, such as scheme wildcards combined with other non-web origins, and check whether set succeeds and the resulting rule takes effect.
  2. Repeat the call for each sensitive feature (camera, geolocation, and any other content setting) and confirm whether the allow rule is stored and honoured without a user prompt.
  3. Test whether the same pattern is accepted through other entry points that take a primaryPattern, and whether a rule written that way is treated the same as one written through contentSettings.
  4. Check whether the pattern can be narrowed or broadened, for example to cover more than the extension's own origin, and whether the resulting rule affects pages the extension should not control.

A positive result is a set call that completes without error for a pattern outside the documented list, followed by the feature working without any user-facing permission prompt.

Hunting notes

This kind of bug hides in the parsing and validation layer of APIs that accept structured patterns, especially where the documented grammar is narrower than what the parser actually accepts. During recon, look for extension APIs that take URL or origin patterns and for permission combinations that let an extension write configuration affecting its own capabilities. The signal is a documented allow-list of pattern forms next to code that accepts more than the list describes.

The report made the impact clear by naming the concrete capabilities obtained (geolocation, microphone, camera), by showing the exact API call that produces the grant, and by stating the tested versions and platforms.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

A Chrome extension is a small program you install into your browser to add features, like a password manager or an ad blocker. To do its job, an extension can ask Chrome for special abilities called permissions. Two of those permissions are contentSettings and activeTab.

The contentSettings permission lets an extension read and change the browser's per-site preferences. These are the same switches you see in Chrome's settings, for example "this site may use my microphone" or "this site may know my location". The activeTab permission gives an extension temporary access to the tab you are currently looking at, but only after you interact with the extension.

The report shows that an extension holding those two permissions can give itself access to sensitive things, such as your location, your microphone and your camera, without ever asking you. It does this by writing a permission rule for itself using a pattern that the browser should not accept. The affected part of Chrome is the Extensions system, and the weakness is classified as insufficient validation of untrusted input, which means the browser does not check carefully enough what an extension hands it.

Setup

The researcher tested on Chrome v53.0.2785.116 and above, on the stable channel. The operating systems used were Ubuntu 16.04 (64-bit), Windows 8 and Windows 10, and the report notes the behaviour will exist for Mac as well. The only thing needed to reproduce it is an installed extension that holds the contentSettings and activeTab permissions.

Finding it

The starting point is the list of patterns that content settings are documented to accept. A pattern is a short text that describes which sites a rule applies to, a bit like an address on an envelope. According to the codebase, the allowed patterns are:

  • [*.]domain.tld (matches domain.tld and all sub-domains)
  • host (matches an exact hostname)
  • a.b.c.d (matches an exact IPv4 ip)
  • [[redacted]:g:h] (matches an exact IPv6 ip)
  • file:///tmp/test.html (a complete URL without a host)

What the researcher noticed is that the pattern *://chrome-extension-ID/* can also be passed as primaryPattern, and that with it any content setting can be set to allow. That pattern is not in the documented list, yet it is accepted. Because the pattern targets the extension's own origin, the extension can write an allow rule for itself and then use the gated feature as if you had granted it.

Exploitation

Step 1: set the content setting for the extension's own origin

The extension calls the contentSettings API for the feature it wants, here the microphone, and passes the undocumented pattern as primaryPattern with setting set to allow:

JavaScript
chrome.contentSettings.microphone.set({
 primaryPattern: '*://chrome-extension-ID/*',
 setting: 'allow'
}, function(){});

Line by line:

  • chrome.contentSettings.microphone.set({ starts a request to the contentSettings API, specifically the microphone setting, asking it to store a new rule. The set method is the action that writes the rule.
  • primaryPattern: '*://chrome-extension-ID/*', is the pattern that says which sites the rule applies to. Here it is a URL pattern scoped to the extension's own origin rather than to a web host. The * at the start stands for any scheme, such as http or https, and the * at the end stands for any path. The middle part is the extension's own identifier.
  • setting: 'allow' is the value being stored: it says the feature is allowed for that pattern.
  • }, function(){}); closes the object and provides an empty callback function. The callback does nothing; the effect is the stored setting.

The primaryPattern value is the key part: the API accepts it even though it falls outside the documented pattern forms. The setting: 'allow' value writes an allow rule for that pattern.

Step 2: use the granted feature

With the allow rule in place, the extension gains access to the microphone. The report states the same approach applies to the other features, geolocation data and camera included, and that the extension can then act as spyware. No user prompt for the permission is shown at any point.

Root cause

The content settings pattern parser is expected to accept only the documented forms: a domain with an optional wildcard subdomain prefix, an exact hostname, an exact IPv4 address, an exact IPv6 address in brackets, or a complete URL without a host. The pattern *://chrome-extension-ID/* does not fit any of those, but it is still accepted as a primaryPattern, and any content setting can be set to allow through it. The validation of the pattern input is therefore insufficient: a scheme wildcard combined with an extension origin passes the check and produces a rule that applies to the extension itself.

The permission model is bypassed because the extension never has to request the sensitive permission from you; it grants it to itself through the settings API.

Impact

An extension with the contentSettings and activeTab permissions can obtain access to geolocation data, the microphone and the camera without asking you, and can use that access to spy on you. The report frames the microphone case explicitly and states the same mechanism covers the other features. The behaviour was confirmed on Ubuntu 16.04, Windows 8 and Windows 10, and the researcher expects it on Mac as well.

Fix

The report does not describe a fix. The appropriate change follows from the root cause: the pattern parser should reject patterns that are not one of the documented forms, so that a scheme wildcard applied to an extension origin cannot be stored as a content setting rule.

Variants to test

  1. Try other undocumented pattern shapes against the same API, such as scheme wildcards combined with other non-web origins, and check whether set succeeds and the resulting rule takes effect.
  2. Repeat the call for each sensitive feature (camera, geolocation, and any other content setting) and confirm whether the allow rule is stored and honoured without a user prompt.
  3. Test whether the same pattern is accepted through other entry points that take a primaryPattern, and whether a rule written that way is treated the same as one written through contentSettings.
  4. Check whether the pattern can be narrowed or broadened, for example to cover more than the extension's own origin, and whether the resulting rule affects pages the extension should not control.

A positive result is a set call that completes without error for a pattern outside the documented list, followed by the feature working without any user-facing permission prompt.

Hunting notes

This kind of bug hides in the parsing and validation layer of APIs that accept structured patterns, especially where the documented grammar is narrower than what the parser actually accepts. During recon, look for extension APIs that take URL or origin patterns and for permission combinations that let an extension write configuration affecting its own capabilities. The signal is a documented allow-list of pattern forms next to code that accepts more than the list describes.

The report made the impact clear by naming the concrete capabilities obtained (geolocation, microphone, camera), by showing the exact API call that produces the grant, and by stating the tested versions and platforms.

Glossary

  • API: a set of rules and commands that one program uses to ask another program to do something, like a menu you order from.
  • Extension: a small add-on program installed in a browser to add features.
  • Permission: a special ability an extension must request from the browser, such as access to the microphone.
  • contentSettings: a Chrome extension permission and API that lets an extension read and change per-site preferences, such as which sites may use the microphone.
  • activeTab: a Chrome extension permission that gives temporary access to the currently active tab after a user gesture.
  • Pattern: a short text describing which sites a rule applies to, for example a domain name or a URL shape.
  • primaryPattern: the field in a content settings call that holds the pattern saying which sites the rule applies to.
  • Origin: the combination of scheme, host and port that identifies where a page or extension comes from, such as https://example.com.
  • Scheme: the first part of a URL, such as http, https or file, which says how to reach the resource.
  • Host: the part of a URL that names the server, such as example.com.
  • Sub-domain: a host that sits under another, such as mail.example.com under example.com.
  • IPv4: a numeric address for a device on a network, written as four numbers separated by dots, such as [redacted].
  • IPv6: a longer numeric address for a device on a network, written in hexadecimal groups separated by colons and enclosed in brackets in a URL.
  • URL: the address of a resource on the web, such as https://example.com/page.
  • Wildcard: a symbol, often *, that stands for any value in a pattern.
  • Parser: the part of a program that reads text and works out its structure.
  • Validation: checking that input is in the expected form before using it.
  • Insufficient validation of untrusted input: a weakness where a program does not check carefully enough input it did not create itself, such as text supplied by an extension.
  • Content setting: a stored preference that says whether a feature is allowed, blocked or asked for a given site or pattern.
  • Allow rule: a stored content setting that permits a feature for a pattern.
  • Callback: a function passed to another function to be run later, often when an operation finishes.
  • Spyware: software that secretly collects information about a person or device.
  • Geolocation: the approximate physical location of a device, often derived from network information.
  • Microphone: a device that captures sound, which a browser can expose to sites or extensions with permission.
  • Camera: a device that captures images or video, which a browser can expose to sites or extensions with permission.
  • Chrome VRP: Google Chrome's Vulnerability Reward Program, which pays researchers for reporting security bugs.
  • Bounty: a payment made to a researcher for a valid security report.
  • Severity: a rating of how serious a security issue is, here medium.
  • Stable channel: the normal release version of Chrome that most people use.
  • Recon: the exploratory phase of security testing, where you look for interesting behaviour before trying to exploit it.
  • Entry point: a place in a program where input can come in, such as an API method.
  • User gesture: an action by the user, such as a click, that the browser can use to decide whether to grant temporary access.

More by Anonymous

View all

2,270 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.