curly-bracket-parser@1.3.2 vulnerabilities

Simple parser to replace variables inside templates/strings and files for node js and browser.

Direct Vulnerabilities

Known vulnerabilities in the curly-bracket-parser package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Cross-site Scripting (XSS)

curly-bracket-parser is a Simple parser to replace variables inside templates/strings and files.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS). When used as a template library, it does not properly sanitize the user input.

PoC

const express = require('express')
const parser = require('curly-bracket-parser')

const app = express()
const port = 3000


app.get('/reflected_string', (req, res) => {
    res.send(parser.parse('hi {{name}}', {name:req.query.name}))
});


app.listen(port, () => {
    console.log(`listening on ${port}`)
})

# Navigate to localhost:3000/reflected_string?name=<script>alert('code')</script>

How to fix Cross-site Scripting (XSS)?

There is no fixed version for curly-bracket-parser.

*