GithubHelp home page GithubHelp logo

Filter Bypasses about antisamy HOT 6 CLOSED

nahsra avatar nahsra commented on July 24, 2024
Filter Bypasses

from antisamy.

Comments (6)

davewichers avatar davewichers commented on July 24, 2024

OK. I started researching this yesterday but I can't replicate the misbehavior. This is what I'm seeing for the very first example under NOT Sanitized by AntiSamy:

Original:
<li><a href="javascript&#00058x=alert,x%281%29">X&#00058;x</a></li>

getCleanHTML() Output:
<li><a href="javascript&amp;#00058x=alert,x%281%29" rel="nofollow">X:x</a></li>

And when I click on that link in (Chrome, FF, IE), I get a similar error in all of them:
File Not Found for: PATH/TO/javascript&#00058x=alert,x(1)

I'm using a slightly newer version of Chrome to test (73), and I'm simply copying the output of AntiSamy into a local HTML file and loading it in the browser. Am I doing something wrong in the way I'm testing this? Seems to me that the encoding of the & to &amp; in the encoded colon (&#00058) would now make that safe.

from antisamy.

davewichers avatar davewichers commented on July 24, 2024

And then for the first 'tricky' test, I'm seeing this:

Original:
<li><a href="javascript&amp;#x3Ax=alert,x%281%29">X&amp;#x3A;x</a></li>

getCleanHTML() Output:
<li><a href="javascript&amp;#x3Ax=alert,x%281%29" rel="nofollow">X&amp;#x3A;x</a></li>

And I'm not seeing the &amp; get decoded, so nothing dangerous here either.

from antisamy.

faf0-addepar avatar faf0-addepar commented on July 24, 2024

Thanks @davewichers

Am I doing something wrong in the way I'm testing this?

Seems perfectly fine.

Seems to me that the encoding of the & to &amp; in the encoded colon (&#58) would now make that safe.

That sounds correct.

Let me repeat these tests again with a standard configuration and report back.

from antisamy.

davewichers avatar davewichers commented on July 24, 2024

@faf0-addepar - Just to be perfectly clear, I didn't fix/change AntiSamy in any way. It already encoded the & the way I describe above.

from antisamy.

faf0-addepar avatar faf0-addepar commented on July 24, 2024

@davewichers - thanks for the info. It's possible that I misconfigured AntiSamy on my end when I compiled this list.

from antisamy.

davewichers avatar davewichers commented on July 24, 2024

OK. I'm closing this then as 'invalid', but if you figure out how to make this bypass work, let us know! Hopefully you can't :-). If you do, I'll reopen.

from antisamy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.