Skip to content

`manager/gomod`: Command injection could be possible via unescaped `depName` in import-path update command

High
jamietanna published GHSA-mpf8-qxrw-gq3w Aug 27, 2026

Package

docker docker.io/mend/renovate-ce (docker)

Affected versions

<15.4.0

Patched versions

15.4.0
docker docker.io/mend/renovate-ee-server (docker)
<15.4.0
15.4.0
docker docker.io/mend/renovate-ee-worker (docker)
<15.4.0
15.4.0
docker docker.io/renovate/renovate (docker)
<44.14.7
44.14.7
helm ghcr.io/mend/charts/mend-renovate-ce (helm)
<15.4.0
15.4.0
helm ghcr.io/mend/charts/mend-renovate-enterprise-edition (helm)
<10.4.0
10.4.0
docker ghcr.io/mend/renovate-ce (docker)
<15.4.0
15.4.0
docker ghcr.io/mend/renovate-ee-server (docker)
<15.4.0
15.4.0
docker ghcr.io/mend/renovate-ee-worker (docker)
<15.4.0
15.4.0
docker ghcr.io/renovate/renovate (docker)
<44.14.7
44.14.7
helm mend-renovate-ce (helm)
<15.4.0
15.4.0
helm mend-renovate-enterprise-edition (helm)
<10.4.0
10.4.0
docker mend/renovate-ce (docker)
<15.4.0
15.4.0
docker mend/renovate-ee-server (docker)
<15.4.0
15.4.0
docker mend/renovate-ee-worker (docker)
<15.4.0
15.4.0
npm renovate (npm)
<44.14.7
44.14.7
docker renovate/renovate (docker)
<44.14.7
44.14.7

Description

When updating a Go module to a new major version (above v1), the module import path changes, such as:

-github.com/oapi-codegen/oapi-codegen
+github.com/oapi-codegen/oapi-codegen/v2

As well as the dependency update itself, users need to update their source code references to this module, otherwise their code will fail to compile.

Renovate supports automagically updating these using postUpdateOptions=['gomodUpdateImportPaths', ...], which calls an external command, mod.

When self-hosting Renovate using the binarySource=docker mode, it was possible for a malicious dependency name to introduce shell metacharacters and/or introduce remote code execution as the Renovate user.

Impact

  • You are running in binarySource=docker
  • You have Go module dependencies
  • One of those modules has a malicious package name
    • Which would therefore not be a valid Go module name
  • Those dependency updates have a major version update available
    • Which may not be possible, given this is not a valid Go module name, so is unlikely to have any updates available in a registry
  • You have set postUpdateOptions=['gomodUpdateImportPaths', ...]

Note

This depends on a precondition of a dependency which has a malicious package name which would not be a valid Go module name, so the go toolchain would be rejecting it, and Go module proxies would also reject it.

It is most likely that this is therefore an "insider attack", because it requires someone committing code to their default branch - to get Renovate to execute the update - but may also require a malicious Go module proxy.

Because this is not a valid Go module name, it is unlikely this attack could be leveraged.

Patches

This is patched in Renovate 44.14.7.

Workarounds

Due to the unlikeliness of this attack vector, we recommend patching your Renovate version.

Notes

A reminder that binarySource=docker is deprecated.

Renovate's next major release (45, no release date currently planned) will remove the docker CLI from our Docker images, and in Renovate 46 (no release date currently planned), we intend to remove binarySource=docker altogether.

If you are using this mode, and cannot migrate to binarySource=install, please provide feedback in this Discussion.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. Learn more on MITRE.