Possible injection because of sanitize cache
Abierto
- Lenguaje dominante
- JavaScript
- Estrellas
- 814
- Forks
- 37
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Basically it's possible to inject dirty html:
```js
const striked = 'test';
console.log(
{striked}
);
console.log(
test
);
console.log(
{striked}
);
```
This is the output:
```html
<strike>test</strike>
test
test
```
Expected output:
```html
<strike>test</strike>
test
<strike>test</strike>
```
After rendering `
test
`, it caches `test` and doesn't sanitize it anymore. It can be seen live [here](https://codepen.io/remziatay/pen/YzroqLm?editors=1010) as well. Just because something was rendered before, it shouldn't mean that it's sanitized.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with the JavaScript reproduction in the issue and compare its three renders with the linked CodePen. Trace the sanitizer cache behavior responsible for reusing the previously rendered content; done means the third render escapes the string like the first while preserving the direct HTML render.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- frontend, security
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100