JS 1.0 · Project evidence

JS Snippet (Redirect Handoff): Find Vulnerabilities

Small Express workspace handoff service with redirect and cross-origin response handling.

Project purpose and scale

JS Snippet (Redirect Handoff): Find Vulnerabilities

Small Express workspace handoff service with redirect and cross-origin response handling.

Source files
2
Reference findings
4
Matched signatures
17
Unmatched signatures
4

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
insecure-transportmediumapp.js:5jsg-insecure-transport-1
open-redirectmediumapp.js:18jsg-open-redirect-1
open-redirectmediumapp.js:21jsg-open-redirect-2
origin-validation-errormediumapp.js:10jsg-cors-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 Highopen-redirectmediumapp.js:185 of 5A user-controlled query parameter is passed directly to res.redirect.1
Claude Opus 4.6 Highopen-redirectmediumapp.js:215 of 5A route parameter is used to build a protocol-relative redirect URL.1
Claude Opus 4.6 Highorigin-validation-errormediumapp.js:105 of 5The service reflects request origin data into Access-Control-Allow-Origin while allowing credentials.1
Claude Opus 4.6 Mediumopen-redirectmediumapp.js:185 of 5A user-controlled query parameter is passed directly to res.redirect.1
Claude Opus 4.6 Mediumopen-redirectmediumapp.js:215 of 5A route parameter is used to build a protocol-relative redirect URL.1
Claude Opus 4.6 Mediumorigin-validation-errormediumapp.js:105 of 5The service reflects request origin data into Access-Control-Allow-Origin while allowing credentials.1
Claude Opus 4.7 Maxopen-redirectmediumapp.js:185 of 5A user-controlled query parameter is passed directly to res.redirect.1
Claude Opus 4.7 Maxopen-redirectmediumapp.js:215 of 5A route parameter is used to build a protocol-relative redirect URL.1
Claude Opus 4.7 Maxorigin-validation-errormediumapp.js:105 of 5The service reflects request origin data into Access-Control-Allow-Origin while allowing credentials.1
Claude Sonnet 4.6 Highinsecure-transportmediumapp.js:53 of 5The handoff service is created with a plaintext HTTP server.1
Claude Sonnet 4.6 Highopen-redirectmediumapp.js:185 of 5A user-controlled query parameter is passed directly to res.redirect.1
Claude Sonnet 4.6 Highopen-redirectmediumapp.js:215 of 5A route parameter is used to build a protocol-relative redirect URL.1
Claude Sonnet 4.6 Highorigin-validation-errormediumapp.js:105 of 5The service reflects request origin data into Access-Control-Allow-Origin while allowing credentials.1
Claude Sonnet 4.6 Mediuminsecure-transportmediumapp.js:53 of 5The handoff service is created with a plaintext HTTP server.1
Claude Sonnet 4.6 Mediumopen-redirectmediumapp.js:185 of 5A user-controlled query parameter is passed directly to res.redirect.1
Claude Sonnet 4.6 Mediumopen-redirectmediumapp.js:215 of 5A route parameter is used to build a protocol-relative redirect URL.1
Claude Sonnet 4.6 Mediumorigin-validation-errormediumapp.js:105 of 5The service reflects request origin data into Access-Control-Allow-Origin while allowing credentials.1

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.7 Maxcsrfmediumapp.js:115 of 5Access-Control-Allow-Credentials is enabled together with a reflected/wildcard-like Access-Control-Allow-Origin, enabling cross-site authenticated requests against this service with no CSRF protections in place.5
Claude Sonnet 4.6 Highcsrfhighapp.js:112 of 5Setting Access-Control-Allow-Credentials: true alongside a dynamically reflected (any) Access-Control-Allow-Origin header means cross-site requests can include cookies and HTTP authentication credentials. There is no CSRF token or other same-site request validation, so any origin can perform credentialed state-changing requests on behalf of authenticated users.2
Claude Sonnet 4.6 Highinformation-exposurelowapp.js:252 of 5The /status endpoint returns the internal service name ('silvergate') and its operational status in a JSON response without any authentication. This leaks service fingerprinting information that aids attacker reconnaissance.2
Claude Sonnet 4.6 Highorigin-validation-errorhighapp.js:101 of 5The fallback value 'null' for Access-Control-Allow-Origin (when no Origin header is present) is dangerous. Browsers assign a null origin to sandboxed iframes (e.g., <iframe sandbox="allow-scripts" src="data:...">) and local files. Combined with Access-Control-Allow-Credentials: true, this allows an attacker page to craft a sandboxed iframe that makes credentialed cross-origin requests which bypass CORS checks.1

Model behavior

Recurrence by configuration

Stable recurrence measures repeated behavior, not independent validity.

ConfigurationMatched signaturesMatched all fiveUnmatched signaturesUnmatched all five
Claude Opus 4.6 High3300
Claude Opus 4.6 Medium3300
Claude Opus 4.7 Max3311
Claude Sonnet 4.6 High4330
Claude Sonnet 4.6 Medium4300

Inspectable source context

Reference locations

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

app.js:5jsg-insecure-transport-1

const app = express();
const server = http.createServer();

app.disable("x-powered-by");
app.js:18jsg-open-redirect-1

  if (target) {
    return res.redirect(target);
  }
app.js:21jsg-open-redirect-2
  }

  return res.redirect("//" + req.params.workspace);
});
app.js:10jsg-cors-1

server.on("request", (req, res) => {
  res.setHeader("Access-Control-Allow-Origin", req.headers.origin || "null");
  res.setHeader("Access-Control-Allow-Credentials", true);
});

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