/

CVE-2026-129943

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in Prime CMS Update Flow

CVE-2026-129943

Received

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Prime CMS's updateSystem GraphQL mutation passes a package version value to a shell command without safely constraining it. An authenticated administrator who can supply a crafted version string may cause commands to run with the privileges of the server process.

Affected context

The issue occurs in Prime CMS's updateSystem GraphQL mutation when it constructs yarn add or npm install commands using the supplied package version string. It becomes risky when an authenticated administrator can invoke the mutation and the value reaches child_process.exec() without effective validation or safe argument handling.

Exploit preconditions

  • Attack surface: The updateSystem GraphQL mutation
  • Required access: An authenticated account with administrator privileges
  • Trigger point: Processing an update request that includes a package version string
  • Why exploitation is possible: The version value is passed to child_process.exec() as part of a shell command, allowing shell metacharacters in the value to alter command execution.

Why this happens

The underlying issue is OS command injection, mapped to CWE-78. The application incorporates externally supplied data into a shell command without safely separating data from command syntax. Because child_process.exec() invokes a shell, untrusted metacharacters can be interpreted as part of the command rather than as literal argument content.

Potential impact

  • An attacker could execute arbitrary shell commands as the server process.
  • The server's files, data, or runtime configuration may be exposed or modified.
  • Depending on the server's permissions and environment, the compromise could affect connected services or other systems.

General mitigation guidance

Defensive patterns focus on avoiding shell interpretation and limiting trust in user-controlled values. Prefer APIs that pass executable arguments separately without invoking a shell; constrain package versions to an expected format and validate them against an explicit policy. Where possible, use fixed, trusted package identifiers and avoid allowing request data to determine command structure. Run the application with least-privilege permissions so that any command execution has limited reach.

How teams detect issues like this

Review code paths that pass request-derived values to shell-invoking APIs, including child_process.exec(). Static analysis can flag shell execution and trace whether GraphQL inputs reach command strings. Code reviews can check that package names and versions are constrained and that data is passed as discrete arguments rather than concatenated into shell commands. Policy checks can restrict shell-based process execution and require validation for administrator-controlled update inputs.

Sources

SourceLink
github.comgithub.com/birkir/prime/blob/v0.3.4-beta.3/packages/prime-core/src/modules/internal/resolvers/PrimeResolver.ts#L110-L132
github.comgithub.com/birkir/prime/blob/v0.3.4-beta.3/packages/prime-core/src/modules/internal/utils/updateNpmPackages.ts#L4-L15
github.comgithub.com/birkir/prime/issues/549
vulncheck.comvulncheck.com/advisories/prime-cms-through-0.4.0-beta.0-os-command-injection-via-updatesystem-mutation

Frequently asked

questions

It may be triggered through the GraphQL API, but exploitation requires access to the mutation and the necessary administrator privileges.

An authenticated administrator account able to invoke the updateSystem mutation is required.

Avoid passing constructed command strings to a shell. Use process APIs that separate the executable from its arguments, and validate version values against a strict policy.

Minimize the use of shell execution, treat request values as untrusted, and apply static analysis and code review checks to identify flows from API inputs to process-launching functions.

Find out what's already
exploitable in your codebase.