Safeguard
Supply Chain Security•

Golang Malware Today: Malicious Go Modules and How to Check Your Builds

Twenty malicious Go modules are on record, the newest from October 2026. What they did, why the module proxy keeps them, and the commands to check your builds.

Safeguard Security Team
18 min read

Yes, malicious Go modules keep turning up, though far fewer than on npm or PyPI. When we pulled the feeds at 18:10 UTC on 25 November 2026, the GitHub Advisory Database listed 20 malware advisories for the Go ecosystem, and OSV held the same 20 MAL- records. Twelve were first published in 2026. The newest two, gocommunity.io/orderedbtree and gogets.dev/btreex, were published on 2 October 2026 and carry a remote access trojan. Nothing new for Go has appeared in November so far. To check live, watch the GitHub malware filter for Go and the OSV Go list, then run osv-scanner against every go.mod you build.

Below: what each recent module did according to its advisory, why the Go module mirror keeps serving a bad module after the source is gone, and the exact commands to check a repository, a laptop and a CI runner today.

Key takeaways

  • 20 malicious Go modules on record, 12 of them from 2026 (GitHub and OSV, 25 November 2026, 18:10 UTC). Ten came in one May cluster under github.com/BufferZoneCorp, two in October under custom import domains.
  • The module mirror keeps what it caches. The proxy.golang.org FAQ says the mirror does not accept removal requests for cached modules. Deleting the GitHub repository does not take a bad module out of circulation.
  • The checksum database proves sameness, not safety. sum.golang.org guarantees everyone gets the same bytes for a version. If those bytes were malicious on day one, they stay malicious and verified.
  • Building is not quite code-free. Go's design goal is that fetching and building never runs module code. A toolchain vulnerability fixed this month, GO-2026-6853, broke that for cgo and .syso linker inputs. Update to Go 1.26.11 or 1.27.4.
  • govulncheck is not a malware check. Only one of the 20 malicious modules has a Go vulnerability database report.
  • Check today: go list -m all, go mod why -m, go mod verify, review go.sum diffs, audit GOPRIVATE and GONOSUMDB, and run osv-scanner scan source -r ..

What we saw on 25 November 2026

We queried the GitHub REST API (/advisories?type=malware&ecosystem=go) and downloaded the OSV Go export (Go/all.zip) at 18:10 UTC, then listed the osv/malicious/go folder of the OpenSSF malicious-packages repository. All three agree on 20 modules. By OSV publication date: 8 in March 2025, 10 on 13 May 2026, and 2 on 2 October 2026.

GitHub shows a publication date of 13 July 2026 for 18 of them, which is when it imported them from the OpenSSF data. The two October modules were published in both places on 2 October.

October 2026: the Graphalgo modules

ModuleOSV recordGitHub advisoryWhat the advisory says
gocommunity.io/orderedbtreeMAL-2026-17453GHSA-p3x3-hqg5-8pwfFirst published around 11 August 2026; contains a second-stage remote access trojan in plaintext that runs automatically
gogets.dev/btreexMAL-2026-17454GHSA-652v-q229-xvr4First published around 8 September 2026; payload hidden in a ZIP disguised as btreex.sql, triggered by a specific price value

Both advisories name the "Graphalgo campaign." According to the advisory text, the trojan "collects system information, executes decrypted Go or JavaScript payloads, and polls two command-and-control channels every 3-10 seconds: an Ethereum smart contract used as a dead drop (Arbitrum Sepolia) and a Slack bot token."

Two details stand out. The import paths sit on custom domains, not github.com, so a reviewer cannot judge them by a familiar GitHub owner name. And the advisories date the first releases to around 11 August and 8 September, roughly seven and three weeks before the records appeared. Anyone who added them in that window and checked only the malware feeds would have seen nothing.

May 2026: the BufferZoneCorp cluster

Ten modules under github.com/BufferZoneCorp were published to OSV on 13 May 2026: config-loader, go-envconfig, go-metrics-sdk, go-retryablehttp, go-stdlib-ext, go-stdlog, go-weather-sdk, grpc-client, log-core and net-helper. Their records run from MAL-2026-3620 to MAL-2026-3629; one example on GitHub is GHSA-vwpg-jg98-m5x3.

Each advisory says the module is part of "the Go BufferZoneCorp and RubyGems knot-theory clusters" and that the packages "steal credentials, set up ssh access and tamper with build/workflow" environment variables. Several names match well-known Go libraries, such as go-retryablehttp and go-envconfig, with only the owner changed. Same repository name, different owner: that is the usual shape of a Go typosquat.

March 2025: typosquats and the BoltDB lookalike

Seven modules named hypert or layout under different throwaway GitHub owners (belatedplanet, shadowybulk, shallowmulti, thankfulmai, ornatedoctrin, utilizedsun, vainreboot) share one advisory text: typosquats "targeting Linux and macOS systems" used as a loader "to download and run another malicious payload." See GHSA-3j46-8f92-vjvq for one of them.

The eighth March record is the best known: github.com/boltdb-go/bolt, a lookalike of the real github.com/boltdb/bolt. Its GitHub advisory, GHSA-9gmm-c6g7-rqg9, says it "contains a backdoor that enables remote code execution." It is also the only one of the 20 with a Go vulnerability database report, GO-2025-3451, which calls it "a malicious typosquat." We covered the full timeline, including how the module proxy cache kept the backdoored version available, in the BoltDB typosquat post.

Why Go is different

Go has no central package registry with accounts. A module path is a URL. The go command fetches modules through proxy.golang.org by default, and the proxy fetches from the source repository the first time anyone asks for a version.

The proxy keeps what it caches. Its FAQ explains that "the mirror aims to cache content in order to avoid breaking builds," and states: "We do not accept requests to remove cached modules or versions from proxy.golang.org." The module author can publish a retract directive to mark a version as one people should not use, but the modules reference notes that retracted versions remain available. If you find a malicious module version in the mirror, the FAQ asks you to report it to security@golang.org under the Go security policy.

The checksum database proves sameness. The Go team's supply chain post describes sum.golang.org as "a global append-only cryptographically-verifiable list of go.sum entries." It guarantees that everyone who downloads a version gets identical bytes. It says nothing about whether those bytes are safe. A typosquat that was malicious when first fetched is recorded, verified and served that way forever.

Building is designed not to run code. The same post states an explicit design goal: "neither fetching nor building code will let that code execute, even if it is untrusted and malicious." There are no install hooks. Module code normally runs when you run a test (go test), run a program (go run or the built binary, where every imported package's init functions execute at start-up) or run go generate. Rust is the opposite case: Cargo build scripts and procedural macros run during compilation, which our Rust malware today page covers.

One exception, fixed this month. GO-2026-6853 (CVE-2026-97038), published 11 November 2026, says that "building a malicious package containing '.syso' files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at link time." The fix is in Go 1.26.11 and 1.27.4, per the Go vulnerability database entry and the golang-announce notice. Until your toolchains are on those versions, go build on an untrusted module is not as safe as the design goal suggests.

Typosquats copy the repository name, not the registry name. Since the module path is the repository URL, an attacker creates github.com/<lookalike-owner>/<popular-repo>. Autocomplete, copy-paste from a forum post or an AI coding assistant's guess can all produce the wrong owner.

How to check yourself today

Run these from each module root. None of them changes your build.

1. List every module in the build

# Every module in the build list, direct and indirect
go list -m all

# Machine-readable, with versions and replacements
go list -m -json all > modules.json

2. Search for the known malicious paths

go list -m all | grep -i -E \
  'github\.com/BufferZoneCorp/|github\.com/boltdb-go/bolt|gocommunity\.io/orderedbtree|gogets\.dev/btreex|github\.com/(belatedplanet|shadowybulk|shallowmulti|thankfulmai)/hypert|github\.com/(ornatedoctrin|utilizedsun|vainreboot)/layout'

# Same search across every go.sum in a monorepo or checkout folder
grep -r -i -E 'BufferZoneCorp|boltdb-go/bolt|gocommunity\.io|gogets\.dev' --include=go.sum .

If anything matches, find out which of your dependencies pulled it in:

go mod why -m github.com/boltdb-go/bolt
go mod graph | grep -i boltdb-go

The modules reference notes that go mod why -m treats its arguments as modules and prints a path to a package in each one.

3. Search the module cache on laptops and runners

A module can sit in $(go env GOMODCACHE) long after it left go.mod, and CI runners often keep that cache between jobs. The cache escapes uppercase letters as ! plus the lowercase letter, so BufferZoneCorp appears as !buffer!zone!corp.

ls "$(go env GOMODCACHE)/github.com/" | grep -i -E '^(!buffer!zone!corp|boltdb-go)$'
ls "$(go env GOMODCACHE)/cache/download/" | grep -i -E '^(gocommunity\.io|gogets\.dev)$'

4. Check the advisory databases directly

# OSV: every record (vulnerability or malware) for one module path
curl -s -d '{"package":{"name":"github.com/boltdb-go/bolt","ecosystem":"Go"}}' \
  https://api.osv.dev/v1/query

# GitHub: all Go malware advisories
curl -s "https://api.github.com/advisories?type=malware&ecosystem=go&per_page=100"

For github.com/boltdb-go/bolt, the OSV query returned both GO-2025-3451 and MAL-2025-2545 today. Our guide to checking whether a package name appears in a malware advisory has more query patterns.

5. Scan with osv-scanner

osv-scanner scan source -r .

The scan source documentation says the command finds lockfiles, SBOMs and manifests under the directory and checks them against the OSV database. OSV serves the MAL- records above alongside vulnerability records, so a match shows up with its MAL- ID.

6. Run govulncheck, for what it is

govulncheck ./...

govulncheck reports known vulnerabilities from the Go vulnerability database that affect your code, and it is the right tool for that job. It is not a malware check. Of the 20 malicious modules above, only github.com/boltdb-go/bolt has a Go database report. A clean govulncheck run says nothing about the other 19.

7. Verify integrity and audit your Go environment

# Module cache files still match what was downloaded
go mod verify

# Settings that change where modules come from and what gets checked
go env GOPROXY GOSUMDB GOPRIVATE GONOPROXY GONOSUMDB GOINSECURE GOFLAGS

What to look for:

  • GOSUMDB=off turns off checksum database verification for everything. The modules reference says the go command then "accepts the hash and adds the file to the module cache without verifying it."
  • Over-broad GOPRIVATE or GONOSUMDB. GOPRIVATE "acts as a default value for GONOPROXY and GONOSUMDB." A pattern such as github.com/* meant to cover your private repositories also skips the checksum database for every public GitHub module. Scope it to your organization, for example github.com/yourorg/*.
  • GOPROXY=direct everywhere. Fetching straight from source repositories skips the mirror. Checksums are still checked against sum.golang.org unless the path matches GONOSUMDB, so the real danger is direct combined with an over-broad GONOSUMDB or GOPRIVATE, which leaves nothing checking the bytes.
  • GOINSECURE allows plain HTTP fetches for matching paths. It should be empty on CI.
  • GOFLAGS=-mod=mod lets build commands update go.mod and go.sum on the fly. Since Go 1.16, build commands default to read-only behaviour and "report an error if a module requirement or checksum needs to be added or updated." Setting GOFLAGS=-mod=readonly on CI makes that explicit and overrides a stray -mod=mod from someone's environment.

Note what go mod verify does and does not do. The reference explains that it checks downloaded files against "hashes recorded in the module cache when they were first downloaded." That catches tampering in the cache. It does not tell you whether the module was malicious when you first downloaded it.

What to do if you pulled one

  1. Isolate the host. Take the laptop or runner off the network, or stop the runner pool. Keep the disk for investigation.
  2. Rotate every credential the host could reach. Git and CI tokens, cloud keys, SSH keys, registry credentials and anything in environment variables. The BufferZoneCorp advisories mention credential theft, SSH access and tampering with build and workflow variables, so check ~/.ssh/authorized_keys and your CI variable settings too.
  3. Look for persistence and changed pipelines. New SSH keys, new deploy keys, edited workflow files and unknown scheduled jobs in repositories the host's tokens could write to.
  4. Clear the caches. Run go clean -modcache on every affected machine and runner, and purge the module from any private proxy or shared build cache.
  5. Rebuild from a clean go.sum. Remove the module, replace it with the legitimate path (for example github.com/boltdb/bolt, or its maintained successor go.etcd.io/bbolt), run go mod tidy, review the go.sum diff and rebuild on a fresh runner.
  6. Redeploy what you shipped. Any binary or container image built or tested with the module present should be rebuilt.

A malicious module has no fixed version. Our note on what to do when a malware advisory has no fixed version covers that case in more depth.

How to stop the next one

  • Review new module paths in every pull request. A new line in go.sum with an unfamiliar owner or domain deserves a look at the repository, its history and its stars before merge.
  • Keep go.sum committed and builds read-only. Fail CI when a build would need to change go.mod or go.sum.
  • Scope GOPRIVATE tightly and never set GOSUMDB=off outside a deliberate, documented case.
  • Run a private module proxy with an allow-list for production builds, so new modules enter through review rather than through go get on a laptop.
  • Consider vendoring for critical services. go mod vendor puts dependency source in your repository, where diffs are visible in code review. The cost is a larger repository and more review work on updates.
  • Patch the toolchain. Move CI and developer machines to Go 1.26.11 or 1.27.4 or later for GO-2026-6853.
  • Separate test credentials. CI jobs that run go test on pull requests should not hold deployment or publishing credentials, since tests run module code.
  • Watch the feeds and re-run the checks above when a new Go MAL- record appears.

How Safeguard helps

Safeguard works on the dependency inventory and vulnerability side of this problem.

  • Full Go module inventory. Safeguard's software composition analysis and deep dependency scanning resolve go.mod and go.sum, direct and transitive, across every connected repository. When the next advisory names a module path, you can see which repositories carry it and which direct dependency brought it in, without running greps repo by repo.
  • Continuous re-scans. Continuous scanning re-evaluates your inventory when vulnerability feeds change, not only when your code changes, so a new advisory for a module you use surfaces against the services that carry it.
  • Policy gates for vulnerabilities. Guardrails let you gate pull requests and CI on known vulnerabilities, licenses and SBOM requirements in your Go services.
  • Install-time blocking for npm and pip. Many Go teams also ship JavaScript front ends and Python tooling. For those ecosystems, Safeguard's Package Firewall runs as an install-time proxy that can block known malicious packages, typosquats and dependency confusion packages before they install.

For the Go build itself, pair that inventory with the Go-native controls above: committed go.sum, read-only builds, tight GOPRIVATE patterns and an allow-listed proxy. For other ecosystems, see npm malware today, Java malware today and Rust malware today, and our explainer on why CVE-based scanning misses malicious packages for why both layers matter.

A malicious module has no fixed version, so the steps above are how you handle one. The rest of your Go dependency tree still carries ordinary vulnerabilities, and that is where the next section applies.

Fix it without waiting for upstream

Whatever the vulnerability, most of the risk sits in two gaps. The first is the time between a fix being published and that fix actually running in your production builds. The second, and worse, is the time before any fix exists at all, while a maintainer works out a patch and a release schedule. Waiting through both gaps is a habit, not a requirement. Safeguard gives teams three ways to close them.

1. Autonomous remediation: pull requests, not tickets

When a fixed version exists, Griffin, Safeguard's security model, opens a policy gated pull request that moves the affected dependency to the safe version, and your own CI runs your tests on it before anyone merges. You can run it on one repository or in bulk across every project that carries the vulnerable version. Remediation categories include dependencies, licenses, security posture and findings, and each one is set separately. Reachability analysis ranks the vulnerable code paths your application actually calls first, so the first pull requests you merge are the ones that matter most. Auto-merge is a separate switch and stays off by default, so your team decides what merges on its own and what still needs a human approval.

2. Gold Open Source: the safe version in seconds, free

gold.safeguard.sh is free and needs no login. Search any CVE or package to see affected and fixed versions, CVSS, EPSS, CISA KEV status and a recommended safe version, or use the "Am I affected?" checker. The same data is available through a free read API, README status badges and RSS threat feeds.

3. Gold Registry: start from components that are already fixed

Safeguard Gold rebuilds patched versions of open-source packages and images from source, signs each build, attaches an SBOM, SLSA provenance and VEX, and serves them from registry.safeguard.sh to your organization. Every Gold artifact is held continuously to zero exploitable critical or high CVEs and a completed license check, with signed build provenance (signed with Safeguard's key and verifiable with cosign, SLSA Build Level 3 as the design target) and a public evidence page you can hand to an auditor. An artifact loses its Gold badge if it regresses. Teams can point their own package directory at the registry so hardened equivalents resolve without changing how developers install anything.

When upstream has no fix yet, or will not ship one, Safeguard first works to get the fix accepted upstream. If the issue is severe or upstream will not move, Safeguard builds a fork, fixes the vulnerability there and publishes a hardened Gold build, so you are not stuck on a maintainer's release schedule. You can also request a hardened build of a specific package. Ask which packages it covers before you plan around it.

Your situationWhat to use
A fixed version existsAutonomous remediation opens the upgrade pull request; Gold Open Source confirms the safe version
You need to know today whether you are affectedGold Open Source lookup and "Am I affected?" checker, free and without login
You want vulnerable versions to stop shippingSafeguard policies and gates in CI
Upstream has no fix yet, or will not ship oneA custom Gold request; fork and patch
You want to start clean on new projectsPull hardened components and images from Gold Registry

One honest limit: when the vulnerable code lives in a vendor appliance, a hosted service or an operating system runtime you do not build yourself, the fix still has to come from that vendor or distribution. The steps above apply to the open source dependencies and container images you build and ship, which is where most teams carry the largest and least tracked share of their exposure.

FAQ

Is there Golang malware today? Yes, in small numbers. As of 25 November 2026 the public feeds list 20 malicious Go modules, 12 of them first published in 2026 and the newest on 2 October 2026.

Does the Go checksum database stop malicious modules? No. It guarantees that everyone receives the same bytes for a given version. A module that was malicious when first fetched is recorded and verified as it is.

Can a malicious Go module run code during go build? Go is designed so that fetching and building never run module code. GO-2026-6853 was an exception through cgo and .syso linker inputs, fixed in Go 1.26.11 and 1.27.4. Module code does run during go test, go generate and when the program starts.

Will govulncheck find malicious Go modules? Not reliably. govulncheck reports known vulnerabilities from the Go vulnerability database, which has a report for only one of the 20 malicious modules on record. Use osv-scanner or the OSV API for MAL- records.

If the GitHub repository is deleted, is the module gone? Usually not. proxy.golang.org keeps cached versions and does not accept removal requests. Report malicious versions to security@golang.org.

Sources

Last reviewed: 25 November 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.