Giter Club home page Giter Club logo

Comments (5)

Flame442 avatar Flame442 commented on July 21, 2024

If you have a serious security vulnerability to report, I am reachable on discord in https://discord.gg/red as Flame#2941. This post does not have enough information for me to understand what is going on, so I urge you to send me a private message if you have a legitimate vulnerability to report.

from discord-embed-sandbox.

TH3AL3X avatar TH3AL3X commented on July 21, 2024

If you have a serious security vulnerability to report, I am reachable on discord in https://discord.gg/red as Flame#2941. This post does not have enough information for me to understand what is going on, so I urge you to send me a private message if you have a legitimate vulnerability to report.

For example in the inputs an XSS can be executed
image

from discord-embed-sandbox.

NonImportantPerson avatar NonImportantPerson commented on July 21, 2024

Yeah but this does not go to any server or even get displayed to anyone else besides you when do that and you can use alert in dev tools so?

from discord-embed-sandbox.

very-lame-username avatar very-lame-username commented on July 21, 2024

I wouldn't call this a serious or exploitable vulnerability, however, a script injection attack is possible if a user pastes a malicious string into one of the fields. Of course, this would be as good as useless as AFAIK the site doesn't store anything valuable other than the values of the other fields, so there's nothing for an attacker to take.

This is still an issue as entering certain values (eg if you want <something> to appear in one of your fields) will make them not show up as they are seen as HTML. (see screenshot)

image

The issue is that there is no input sanitisation performed in the updateEmbed function, for example here:

if (embed.url) {
$('.embed-inner').append('<div class="embed-title"><a href="' + embed.url + '">' + embed.title + '</a></div>');

If the input is first properly sanitised, for example with something like this, or ideally a proper sanitisation library, the issue would be resolved.

from discord-embed-sandbox.

djfjfofoc3 avatar djfjfofoc3 commented on July 21, 2024

Considering, afaik, you cannot add URL-parameters for an embed (ie ?title=test&description=<script>alert('hi')</script>&fields=[title=a;value=b;inline=1]), this doesn't seem like a Cross-Site-Scripting Vulnerability, rather a trivial bug.
However, I would still like to see sanitation, so forks of the project which may allow that aren't unknowingly vulnerable to this.
Will likely open a PR that fixes this in a bit.

EDIT: opened a PR that fixes this; see #25

from discord-embed-sandbox.

Related Issues (15)

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.