Skip to content

← Public intelligence

Go package

github.com/go-viper/mapstructure/v2

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.3GoPublished

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

    CVE-2025-11065 · GHSA-2464-8j7c-4cjm

    Affected
    • Go github.com/go-viper/mapstructure/v2 <= 2.3.0
    Fixed in
    2.4.0· Vendor fix available
    Issue
    Use of this library in a security-critical context may result in leaking sensitive information, if used to process sensitive fields. Details OpenBao (and presumably HashiCorp Vault) have surfaced error messages from mapstructure as follows: https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/fielddata.go#L43-L50 where this calls mapstructure.WeakDecode(...): https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/fielddata.go#L181-L193 Notably, WeakDecode(...) eventually calls one of the decode helpers, which surfaces the original value via strconv helpers: https://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/mapstructure.go#L720-L727 https://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/mapstructure.go#L791-L798 https://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/decodehooks.go#L180 & more.…

    Recommended action: Upgrade to 2.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 5.3GoPublished

    mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data

    GHSA-fv92-fjc5-jj9h

    Affected
    • Go github.com/go-viper/mapstructure/v2 < 2.3.0
    Fixed in
    2.3.0· Vendor fix available
    Issue
    Use of this library in a security-critical context may result in leaking sensitive information, if used to process sensitive fields. Details OpenBao (and presumably HashiCorp Vault) have surfaced error messages from mapstructure as follows: https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/fielddata.go#L43-L50 where this calls mapstructure.WeakDecode(...): https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/fielddata.go#L181-L193 Notably, WeakDecode(...) eventually calls one of the decode helpers, which surfaces the original value: https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L679-L686 https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L726-L730 https://github.com/go-viper/mapstructure/blob/1a66224d5e54d8757f63bd66339cf764c3292c21/mapstructure.go#L783-L787 & more. PoC To reproduce…

    Recommended action: Upgrade to 2.3.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →