Improper Output Neutralization for Logs Affecting github.com/go-viper/mapstructure/v2 package, versions <2.4.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Output Neutralization for Logs vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMGOVIPERMAPSTRUCTUREV2-12177854
  • published26 Aug 2025
  • disclosed21 Aug 2025
  • creditAlexander Scheel

Introduced: 21 Aug 2025

New CVE NOT AVAILABLE CWE-117  (opens in a new tab)

How to fix?

Upgrade github.com/go-viper/mapstructure/v2 to version 2.4.0 or higher.

Overview

Affected versions of this package are vulnerable to Improper Output Neutralization for Logs via the WeakDecode function when handling malformed input data. An attacker can cause sensitive information to be included in error logs by submitting specially crafted input that triggers error messages containing original values.

References

CVSS Base Scores

version 4.0
version 3.1