-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
url(...)
style injections in cosmetic filters
#668
Comments
gorhill
added a commit
to gorhill/uBlock
that referenced
this issue
Jul 13, 2019
Thanks for the report. For your interest @ameshkov, Adguard also suffers this issue. On my side I just outright banned the use of |
@gorhill huh, yep, thanks for mentioning it! |
This was referenced Jul 13, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Jul 15, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 2, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 2, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 14, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 19, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 28, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Aug 29, 2019
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Oct 28, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Oct 28, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Oct 28, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Oct 28, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Oct 29, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Nov 18, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
antonok-edm
added a commit
to brave/adblock-rust
that referenced
this issue
Nov 18, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
AndriusA
pushed a commit
to brave/adblock-rust
that referenced
this issue
Nov 22, 2019
Rather than pulling in an entire CSS styling library as a dependency, this ensures that the syntax of supplied CSS selectors is valid, without concern for the textual content of individual tokens. As new pseudo-selectors are added to the W3C spec, this implementation should still function as intended. add tests for bad CSS selector inputs protect against urls appearing in `:style()` filters See uBlockOrigin/uBlock-issues#668
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
There is a regex in the cosmetic filtering code to invalidate filter rules that contain
url(
. However, it's possible to bypass this check by using escape codes for any of those characters, e.g.\75 rl(
.A specific URL where the issue occurs
This can be applied to any URL, fetching a resource from any other URL. As a specific example, if the following rule is inserted into the filter list:
Visiting
https://example.com
will display the uBlock Origin logo all over the page.Steps to Reproduce
https://example.com
in a new tabExpected behavior:
The rule should be treated the same as if it did not use an escape sequence, i.e. ignored.
Actual behavior:
The rule is applied to the page, causing an additional network request to fetch the image resource from a 3rd party (in this case, Github).
Your environment
More info
This particular line contains the existing, insufficient check for the presence of
url(
: https://github.com/gorhill/uBlock/blob/8d8336ffae6ddfa44faaea77cbe5d476109fd007/src/js/static-ext-filtering.js#L668The text was updated successfully, but these errors were encountered: