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

Source: https://junglewise.ai/threats/go-2025-3787-may-leak-sensitive-information-in-logs-when-processing-33797afa  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-07-28  
License: CC BY 4.0 with a link back

Severity: info · Published 2025-07-28

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

Technologies: [github.com/go-viper/mapstructure/v2 (Go)](https://junglewise.ai/threats/technologies/github-com-go-viper-mapstructure-v2). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 28 July 2025.

**Which products and versions are affected?** github.com/go-viper/mapstructure (Go) SEMVER:introduced=0; github.com/go-viper/mapstructure/v2 (Go) SEMVER:introduced=0,fixed=2.3.0.

**Is there a fix for This vulnerability?** Yes. github.com/go-viper/mapstructure/v2 (Go): upgrade to 2.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** Check whether you run github.com/go-viper/mapstructure (Go) or github.com/go-viper/mapstructure/v2 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/go-viper/mapstructure/v2 (Go): upgrade to 2.3.0 or later

  ```sh
  go get github.com/go-viper/mapstructure/v2@v2.3.0
  ```


## Affected products

- github.com/go-viper/mapstructure (Go) SEMVER:introduced=0
- github.com/go-viper/mapstructure/v2 (Go) SEMVER:introduced=0,fixed=2.3.0

## Related threats

- [Duplicate Advisory: go-viper's mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data](https://junglewise.ai/threats/duplicate-advisory-go-viper-s-mapstructure-may-leak-sensitive-889d9655)
- [go-viper mapstructure information disclosure in WeakDecode](https://junglewise.ai/threats/cve-2025-11065-go-viper-mapstructure-information-disclosure-in-weakdecode)
- [mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data](https://junglewise.ai/threats/mapstructure-may-leak-sensitive-information-in-logs-when-processing-8a9413d7)
