CWE-1357AI-written & agentic codeSeverity · High

Packages that do not exist, until someone registers them

A coding assistant suggests a package name that does not exist. An attacker can publish a harmful package under that name and wait for builds to install it.

At a glance

Controls
CWE-1357
Typical severityHigh
ReferenceCWE-1357

What it is

Coding assistants sometimes invent package names that sound right but were never published. A developer adds the name to the project. The install fails, or a package with that name appears later.

Attackers collect names that assistants tend to invent and register them with harmful install scripts. The next build or developer machine that installs the name runs the attacker's code. AI-assisted attackers can generate long lists of likely invented names and register them at scale.

Where it hides

What a reviewer can look for in the code and in the behaviour, before anyone proves it.

  • Dependency manifests and lock files changed in AI-assisted pull requests
  • Install steps in CI pipelines that fetch the latest version without a lock file
  • Scripts and notebooks that install packages at run time
  • Container build files that install packages by name with no pinned version

How MATT tests it

The proof runs against the deployed product, on every release, whoever wrote the code.

  1. 01Read the dependency manifests and lock files and list every package added recently.
  2. 02Look up each name in the public registry and note its owner, age, download history and source repository.
  3. 03Flag names that are missing, very new, or owned by an account with no link to the expected project, without installing them.
The rule, in plain English

Every new dependency must be checked against a trusted registry and owner.

Executable check

for each new dependency: look up name and owner in the registry expect: the package exists and its owner is on the approved list expect: the version is pinned in the lock file with a checksum expect: CI fails when a dependency is not on the allow-list

Every rule MATT holds →

What the fix looks like

  1. 01

    Keep an allow‑list of approved packages and owners and enforce it in CI.

  2. 02

    Pin every dependency in a lock file with checksums.

  3. 03

    Install through an internal registry proxy that blocks unknown or newly published packages.

  4. 04

    Review every new dependency in a pull request before merge.

A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02