Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
Is it possible to have XSS without quotes or html tags?

I'm trying to determine if code from a colleague is vulnerable to XSS. They are building a widget that accepts user input as query parameters to configure a user interface built with Konva and HTML canvas.

The program will use the user input to add text to a user interface or specify a hexadecimal color string to configure some primary colors of the UI. They are allowing the widget to be configured via query parameters so configured widgets can be shared easily with other people.

My question is, assuming the web application properly strips or sanitizes all HTML tags and quotes from the user input, is it still possible for an XSS vulnerability if the user sends through any vanilla or encoded javascript?

Ruby on Rails (ERB) Example:

<input id="widget-title" type="text" value="<%= params[:title] %>">
<input id="widget-color" type="color" value="<%= params[:color] %>">

We have javascript that will take these values and display on a canvas like:

new Konva.Text({
text: document.querySelector("#widget-title").value(),
color: document.querySelector("#widget-color").value()
});

Again, assuming that HTML tags and quotes are stripped or sanitized to hexadecimal, could a user enter (hex-encoded) javascript into the query parameters somehow to execute arbitrary js?

If this is not directly possible, are there other concerns with this approach? I have seen some usages of inline javascript like:

<tr background="javascript:alert(window.location)"></tr>

If a future developer were to implement this while passing user input, that would be bad. But I can't find a spec on what HTML attributes allow inline javascript like this or if there is perhaps another way to encode raw javascript that could potentially be executed when it's the value of text input (except for, of course, using something like eval).

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda