JS 1.0 · Project evidence

JS App: Find Vulnerabilities 1

Express.js app for benchmark testing

Project purpose and scale

JS App: Find Vulnerabilities 1

Express.js app for benchmark testing

Source files
1
Reference findings
7
Matched signatures
25
Unmatched signatures
11

Reference context

Deterministic reference findings

These findings define the project reference set for JS 1.0. Their presence does not establish exhaustive ground truth.

ClassSeverityLocationReference ID
information-exposuremediumapp.js:13js-xpowered-by-header-1
hardcoded-credentialshighapp.js:9js-hardcoded-creds-1
allocation-of-resources-without-limits-or-throttlingmediumapp.js:34js-allocation-of-resources-without-limits-or-throttling-1
allocation-of-resources-without-limits-or-throttlingmediumapp.js:43js-allocation-of-resources-without-limits-or-throttling-2
xsshighapp.js:31js-xss-1
path-traversalhighapp.js:37js-path-traversal-1
command-injectioncriticalapp.js:45js-cmd-injection-1

Finding evidence

Reference-matched normalized signatures

Matched means agreement with the Snyk Code reference set, not independent ground-truth adjudication.

Severity and description show the deterministic most-frequent metadata variant; the final column records how many variants were observed across repetitions.

ConfigurationClassRepresentative severityLocationRecurrenceRepresentative descriptionMetadata variants
Claude Opus 4.6 Highcommand-injectioncriticalapp.js:455 of 5User-controlled req.query.host concatenated into shell command passed to exec()1
Claude Opus 4.6 Highhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB_CONFIG object1
Claude Opus 4.6 Highpath-traversalhighapp.js:375 of 5User-controlled req.query.filename appended to base path without normalization1
Claude Opus 4.6 Highxsshighapp.js:315 of 5Unsanitized req.query.name interpolated directly into HTML response1
Claude Opus 4.6 Mediumcommand-injectioncriticalapp.js:455 of 5User-controlled req.query.host concatenated into shell command passed to exec()1
Claude Opus 4.6 Mediumhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB_CONFIG object1
Claude Opus 4.6 Mediumpath-traversalhighapp.js:375 of 5User-controlled req.query.filename appended to base path without normalization1
Claude Opus 4.6 Mediumxsshighapp.js:315 of 5Unsanitized req.query.name interpolated directly into HTML response1
Claude Opus 4.7 Maxcommand-injectioncriticalapp.js:455 of 5User-controlled req.query.host concatenated into shell command passed to exec()1
Claude Opus 4.7 Maxhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB_CONFIG object1
Claude Opus 4.7 Maxinformation-exposuremediumapp.js:131 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Opus 4.7 Maxpath-traversalhighapp.js:375 of 5User-controlled req.query.filename appended to base path without normalization1
Claude Opus 4.7 Maxxsshighapp.js:315 of 5Unsanitized req.query.name interpolated directly into HTML response1
Claude Sonnet 4.6 Highallocation-of-resources-without-limits-or-throttlingmediumapp.js:342 of 5Expensive operation (a file system operation) is performed by an endpoint handler which does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.1
Claude Sonnet 4.6 Highcommand-injectioncriticalapp.js:455 of 5User-controlled req.query.host concatenated into shell command passed to exec()1
Claude Sonnet 4.6 Highhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB_CONFIG object1
Claude Sonnet 4.6 Highinformation-exposuremediumapp.js:132 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Sonnet 4.6 Highpath-traversalhighapp.js:375 of 5User-controlled req.query.filename appended to base path without normalization1
Claude Sonnet 4.6 Highxsshighapp.js:315 of 5Unsanitized req.query.name interpolated directly into HTML response1
Claude Sonnet 4.6 Mediumallocation-of-resources-without-limits-or-throttlingmediumapp.js:342 of 5Expensive operation (a file system operation) is performed by an endpoint handler which does not use a rate-limiting mechanism. It may enable the attackers to perform Denial-of-service attacks. Consider using a rate-limiting middleware such as express-limit.1
Claude Sonnet 4.6 Mediumcommand-injectioncriticalapp.js:455 of 5User-controlled req.query.host concatenated into shell command passed to exec()1
Claude Sonnet 4.6 Mediumhardcoded-credentialshighapp.js:95 of 5Hardcoded database password in DB_CONFIG object1
Claude Sonnet 4.6 Mediuminformation-exposuremediumapp.js:132 of 5X-Powered-By header exposes information about the used framework to potential attackers1
Claude Sonnet 4.6 Mediumpath-traversalhighapp.js:375 of 5User-controlled req.query.filename appended to base path without normalization1
Claude Sonnet 4.6 Mediumxsshighapp.js:315 of 5Unsanitized req.query.name interpolated directly into HTML response1

Finding evidence

Unmatched normalized signatures

Unmatched reports may be false-positive-shaped, adjacent, or likely product-gap candidates.

Severity and description show the deterministic most-frequent metadata variant; the final column records how many variants were observed across repetitions.

ConfigurationClassRepresentative severityLocationRecurrenceRepresentative descriptionMetadata variants
Claude Opus 4.6 Highsql-injectioncriticalapp.js:245 of 5User-supplied 'username' query parameter is directly concatenated into a SQL query string without parameterization or sanitization, allowing SQL injection attacks.4
Claude Opus 4.6 Highxssmediumapp.js:475 of 5Output from the exec command is embedded directly in HTML <pre> tags without escaping, which could allow XSS if the command output contains HTML/script content.5
Claude Opus 4.6 Mediumsql-injectioncriticalapp.js:245 of 5User-supplied 'username' query parameter is directly concatenated into a SQL query string without sanitization or parameterized queries, allowing SQL injection.3
Claude Opus 4.6 Mediumxssmediumapp.js:475 of 5Output of the ping command (which includes user-controlled 'host' input) is rendered in HTML inside a <pre> tag without escaping, enabling reflected XSS.5
Claude Opus 4.7 Maxinsecure-transportmediumapp.js:561 of 5Server listens over plain HTTP without TLS, exposing all traffic (including any credentials/session data) to interception.1
Claude Opus 4.7 Maxsql-injectioncriticalapp.js:245 of 5SQL injection in /users endpoint: req.query.username is concatenated directly into SQL string without parameterization or sanitization.5
Claude Opus 4.7 Maxxssmediumapp.js:474 of 5Command stdout (influenced by user input) is reflected into HTML via <pre>${stdout}</pre> without escaping, enabling XSS in addition to the command injection.4
Claude Sonnet 4.6 Highsql-injectioncriticalapp.js:245 of 5The 'username' query parameter is concatenated directly into a SQL string without parameterization or escaping: "SELECT * FROM users WHERE username = '" + username + "'". An attacker can inject arbitrary SQL (e.g., ' OR '1'='1) to bypass authentication or exfiltrate data.5
Claude Sonnet 4.6 Highxsshighapp.js:474 of 5The stdout output from the exec() call is embedded into an HTML <pre> block and sent to the client without HTML escaping. Combined with the command injection on line 45, an attacker can inject commands that produce output containing malicious HTML/JavaScript tags, resulting in stored or reflected XSS.4
Claude Sonnet 4.6 Mediumsql-injectioncriticalapp.js:245 of 5The 'username' query parameter is concatenated directly into a raw SQL string without parameterization or escaping. An attacker can manipulate the query to dump, modify, or delete data (e.g., username=' OR '1'='1).5
Claude Sonnet 4.6 Mediumxssmediumapp.js:474 of 5The /ping endpoint injects raw command stdout directly into an HTML response inside a <pre> tag without HTML-encoding. If the output or a crafted error message contains HTML/script content, it can result in XSS.4

Model behavior

Recurrence by configuration

Stable recurrence measures repeated behavior, not independent validity.

ConfigurationMatched signaturesMatched all fiveUnmatched signaturesUnmatched all five
Claude Opus 4.6 High4422
Claude Opus 4.6 Medium4422
Claude Opus 4.7 Max5431
Claude Sonnet 4.6 High6421
Claude Sonnet 4.6 Medium6421

Inspectable source context

Reference locations

Apache-licensed fixture excerpts are shown around declared reference lines. They are evidence, not runnable examples.

app.js:13js-xpowered-by-header-1
};

const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
app.js:9js-hardcoded-creds-1
  host: "localhost",
  user: "admin",
  password: "supersecretpassword123",
  database: "users_db",
};
app.js:34js-allocation-of-resources-without-limits-or-throttling-1
});

app.get("/file", (req, res) => {
  const filename = req.query.filename;
  const basePath = "/var/app/public/";
app.js:43js-allocation-of-resources-without-limits-or-throttling-2
});

app.get("/ping", (req, res) => {
  const host = req.query.host;
  exec("ping -c 1 " + host, (err, stdout, stderr) => {
app.js:31js-xss-1
app.get("/greet", (req, res) => {
  const name = req.query.name;
  res.send(`<html><body><h1>Hello, ${name}!</h1></body></html>`);
});
app.js:37js-path-traversal-1
  const filename = req.query.filename;
  const basePath = "/var/app/public/";
  fs.readFile(basePath + filename, "utf8", (err, data) => {
    if (err) return res.status(404).send("Not found");
    res.send(data);
app.js:45js-cmd-injection-1
app.get("/ping", (req, res) => {
  const host = req.query.host;
  exec("ping -c 1 " + host, (err, stdout, stderr) => {
    if (err) return res.status(500).send("Error");
    res.send(`<pre>${stdout}</pre>`);

Interpretation boundary

Inspect divergence before classifying it

Unmatched reports may be false-positive-shaped, adjacent to the release reference scope, or likely valid product-gap candidates. Missed reference findings may expose representative-versus-systematic coverage behavior.

Return to explorer evidence