Is github.com/go-viper/mapstructure/v2 2.0 vulnerable?

Go · 1 release from 2.0.0 to 2.0.0 · latest github.com/go-viper/mapstructure/v2 is 2.5.0 · checked 18 Nov 2026

Yes: 4 known advisories

Yes. github.com/go-viper/mapstructure/v2 2.0.0, the last 2.0 release, is affected by 4 known security advisories (2 medium, 2 low), including CVE-2025-11065, CVE-2025-11065. Upgrade to 2.4.0 or later to fix all of them.

Upgrade with:go get github.com/go-viper/mapstructure/v2@v2.4.0

Is your project on an affected github.com/go-viper/mapstructure/v2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Advisories affecting github.com/go-viper/mapstructure/v2 2.0.0

  • LowCVE-2025-11065GO-2025-390029 Aug 2025

    Go-viper's mapstructure May Leak Sensitive Information in Logs in github.com/go-viper/mapstructure

    Affected
    <2.4.0
    Fixed in
    2.4.0
  • MediumCVE-2025-11065GHSA-2464-8j7c-4cjm21 Aug 2025

    go-viper's mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data

    Affected
    <2.4.0
    Fixed in
    2.4.0
  • LowGO-2025-378728 Jul 2025

    May leak sensitive information in logs when processing malformed data in github.com/go-viper/mapstructure

    Affected
    <2.3.0
    Fixed in
    2.3.0
  • MediumGHSA-fv92-fjc5-jj9h27 Jun 2025

    mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data

    Affected
    <2.3.0
    Fixed in
    2.3.0

Which of your client projects are still on github.com/go-viper/mapstructure/v2 2.0?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact github.com/go-viper/mapstructure/v2 version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other github.com/go-viper/mapstructure/v2 versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the Go registry. Refreshed daily.