Skip to content

Go module vulnerability checker

Free, no sign-up

Check any version of a Go module, or of the Go standard library, for known vulnerabilities. See each CVE and GO advisory with the version that fixes it.

The module path from go.mod, such as golang.org/x/crypto. Use stdlib for Go itself.

One exact version, as in your lockfile. Not a range.

This tool asks the OSV API directly from your browser. It sends the Go module path and the version you check, and nothing is sent to HardenKit.

How to use the go module vulnerability checker

  1. Enter the module path from go.mod, or stdlib for the standard library.
  2. Enter the version from go.mod, or your Go release for stdlib.
  3. Press the button to ask OSV.
  4. Read the table, worst first, and raise the module to the “Fixed in” version with go get.

About this tool

A Go dependency is a module, named by its path: golang.org/x/crypto, github.com/gin-gonic/gin. Enter a module path and a version to see the known vulnerabilities that cover it. The path is the one in the require lines of go.mod, not the import path of a package inside the module. From major version 2 on, the path ends in the version, as in github.com/jackc/pgx/v5.

Take the version from go.mod or from go list -m all, which also shows indirect dependencies. You can write it with or without the leading v. To check Go itself, enter stdlib as the module and your Go release as the version, for example 1.21.0: standard library vulnerabilities are fixed by upgrading Go, not a module.

The data comes from OSV, which carries the Go vulnerability database (the GO IDs) and the GitHub Advisory Database. The official tool, govulncheck, goes further than this page can: it reads your code and reports only the vulnerabilities in functions your program calls. This checker reports every advisory for the module version, whether or not your code reaches the affected function.

Sources

Questions

How is this different from govulncheck?

govulncheck analyzes your source or binary and reports a vulnerability only when your code can call the affected function. This page works from the module path and version alone, so it lists every advisory for that version. Use it for a first answer, and govulncheck to see what reaches your code.

How do I check the Go standard library?

Enter stdlib as the module path and the Go version as the version, such as 1.22.3. The Go vulnerability database files standard library issues under that name. The fix is a newer Go release.

Is the module path the same as the import path?

Not always. The module path is the prefix shared by all packages in the module: golang.org/x/crypto is the module, golang.org/x/crypto/ssh a package in it. Advisories are filed against the module, so use the path from go.mod.

What is a GO ID?

GO-2024-3321 and the like are IDs of the Go vulnerability database, which the Go security team reviews. Entries usually have a CVE and a GitHub advisory ID as well; we merge them into one row.

Related tools