Skip to content

Security: Cosmetic filters can make background requests using image-set() on Firefox #1811

@hackvertor

Description

@hackvertor

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

Description

It's possible to create background requests using the image-set() CSS function on Firefox. uBlock prevents requests using url() but does not for image-set().

*#$#* { font-family: 'blah'; background:image-set('https://hackvertor.co.uk/images/logo.gif' 1x) }

A specific URL where the issue occurs

https://portswigger-labs.net/

Steps to Reproduce

  1. Open Firefox and add the following rule to "My filters":
*#$#* { font-family: 'blah'; background:image-set('https://hackvertor.co.uk/images/logo.gif' 1x) }
  1. Visit https://portswigger-labs.net/ notice the background image has been added to everything.

Expected behavior

image-set() should be blocked like url()

Actual behavior

image-set() is not blocked and a background request is made

uBlock Origin version

1.38.7b19

Browser name and version

Firefox 94.0.1

Operating System and version

MacOS 10.15.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedissue has been addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions