Skip to content

JavaScript: data flow through named exports accessed with await import() is lost #23083

Backlog

Description

@ebickle

Description of the issue

Data flow does not seem to pass through a named export that is read from a dynamic import, for example const { handle } = await import("./handle.js");.

Reproduction
handler.js:

import { exec } from "node:child_process";

export const handle = (command) => exec(command); // command injection sink

run.js:

import express from "express";

const app = express();

app.get("/", async (req, res) => {
  const { handle } = await import("./handle.js");
  handle(req.query.command); // remote flow source
  res.end();
});

sample.zip

Activity

  1. added
    question
    on Nov 10, 2026
  2. changed the title [-]JavaScript: Add support for import() syntax from ECMAScript 2020 (dynamic import)[/-] [+]JavaScript: data flow through named exports accessed with await import() is lost[/+] on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions