GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-w9mx-xmg4-gc4rhigh8.0

laravel-backup-restore has an OS Command Injection during database restore

Check your stack

The advisory, in context

Summary

A crafted backup archive can trigger OS command injection during database restore. The restore workflow extracts a ZIP archive, enumerates files under db-dumps, converts the dump path to an absolute path, and passes that path into database import commands that are built as shell command strings.

The dump filename is not shell-escaped before it is interpolated into commands such as:

  • mysql ... < {dumpFile}
  • gunzip -c {dumpFile} / gunzip < {dumpFile}
  • psql ... < {dumpFile}
  • sqlite3 ... < {dumpFile}

Because Illuminate\Support\Facades\Process::run(string) uses Symfony Process::fromShellCommandline(), shell metacharacters in the dump filename are interpreted by /bin/sh on Unix-like systems or by the platform shell on Windows.

Impact

If an attacker can cause an operator or automation to restore a malicious backup archive, the attacker can execute arbitrary shell commands as the PHP/Laravel application user on the system performing the restore. This can lead to application compromise, database credential disclosure, tampering with restored data, and further lateral movement depending on deployment permissions.

This is not about malicious SQL inside the dump. The command injection is carried in the ZIP entry filename under db-dumps, before the dump content is imported.

Patches

The vulnerability has been fixed in v1.9.4 of the package.

Workarounds

There is no configuration option that disables the vulnerable code path. Upgrading to the patched release is the only complete fix.

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

Earlier releases before 1.9.4

Fixed in 1.9.4

32 explicitly affected versions

v0.1.0, v0.2.0, v0.3.0, v0.3.1, v1.0.0, v1.0.1, v1.0.2, v1.1.0, v1.1.1, v1.1.2, v1.1.3, v1.1.4, v1.1.5, v1.2.0, v1.3.0, v1.3.1, v1.3.2, v1.4.0, v1.4.1, v1.4.2, v1.5.0, v1.5.1, v1.5.2, v1.6.0, v1.6.1, v1.6.2, v1.7.0, v1.8.0, v1.9.0, v1.9.1, v1.9.2, v1.9.3

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "1.9.4"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "v0.1.0",
    "v0.2.0",
    "v0.3.0",
    "v0.3.1",
    "v1.0.0",
    "v1.0.1",
    "v1.0.2",
    "v1.1.0",
    "v1.1.1",
    "v1.1.2",
    "v1.1.3",
    "v1.1.4",
    "v1.1.5",
    "v1.2.0",
    "v1.3.0",
    "v1.3.1",
    "v1.3.2",
    "v1.4.0",
    "v1.4.1",
    "v1.4.2",
    "v1.5.0",
    "v1.5.1",
    "v1.5.2",
    "v1.6.0",
    "v1.6.1",
    "v1.6.2",
    "v1.7.0",
    "v1.8.0",
    "v1.9.0",
    "v1.9.1",
    "v1.9.2",
    "v1.9.3"
  ]
}

References