GHSA-86rf-68f4-2cph: Duplicate Advisory Go-viper's Mapstructure May Leak Sensitive Vulnerability

MODERATE
CVSS 5.3
CWE-117
Published
Advisory Summary

GHSA-86rf-68f4-2cph is a MODERATE (CVSS 5.3) go-viper's mapstructure may leak sensitive vulnerability (CWE-117: Improper Output Neutralization for Logs) affecting Duplicate Advisory libraries in the Go ecosystem. The issue involves go-viper's mapstructure may leak sensitive information in logs when processing malformed data. Remediation is available by upgrading affected packages to version 2.4.0.

GHSA-86rf-68f4-2cph at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-86rf-68f4-2cph
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-117: Improper Output Neutralization for Logs
Affected Product Duplicate Advisory
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-86rf-68f4-2cph

To remediate this vulnerability, upgrade all affected Duplicate Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/go-viper/mapstructure/v2 fixed: 2.4.0
Upgrade github.com/go-viper/mapstructure/v2 to 2.4.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/go-viper/mapstructure/v2

How to Check if You Are Affected

To determine whether your application is affected by GHSA-86rf-68f4-2cph, inspect your project dependencies for Duplicate Advisory:

inspect dependencies for github.com/go-viper/mapstructure/v2

Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-117: Improper Output Neutralization for Logs, where the product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file. In Duplicate Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-2464-8j7c-4cjm. This link is maintained to preserve external references. ### Original Description A flaw was found in github.com/go-viper/mapstructure/v2, in the field processing component using mapstructure.WeakDecode. This vulnerability allows information disclosure through detailed error messages that may leak sensitive input values via malformed user-supplied data processed in security-critical contexts.

GHSA-86rf-68f4-2cph Affected Duplicate Advisory Versions

1 component(s)
Fixed Versions:
2.4.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/go-viper/mapstructure/v2
Go
< 2.4.0
2.4.0

References

Frequently Asked Questions

What is GHSA-86rf-68f4-2cph?
GHSA-86rf-68f4-2cph is a security vulnerability in Duplicate Advisory involving go-viper's mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data under CWE-117: Improper Output Neutralization for Logs.
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to 2.4.0 across affected packages: github.com/go-viper/mapstructure/v2.
What version fixes GHSA-86rf-68f4-2cph?
Upgrading to 2.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/go-viper/mapstructure/v2 affected?
Yes, github.com/go-viper/mapstructure/v2 is affected in releases prior to 2.4.0. Upgrade your dependency to 2.4.0 or later.
What is the CVSS score of GHSA-86rf-68f4-2cph?
GHSA-86rf-68f4-2cph has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-86rf-68f4-2cph?
GHSA-86rf-68f4-2cph is classified under CWE-117: Improper Output Neutralization for Logs (The product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file.).
How can I check Go dependencies for GHSA-86rf-68f4-2cph?
Run the dependency tree command: 'inspect dependencies for github.com/go-viper/mapstructure/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-86rf-68f4-2cph",
  "modified" : "2026-01-27T21:00:31Z",
  "published" : "2026-01-26T21:30:36Z",
  "withdrawn" : "2026-01-27T21:00:31Z",
  "aliases" : [ ],
  "summary" : "Duplicate Advisory: go-viper's mapstructure May Leak Sensitive Information in Logs When Processing Malformed Data",
  "details" : "### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-2464-8j7c-4cjm. This link is maintained to preserve external references.\n\n### Original Description\nA flaw was found in github.com/go-viper/mapstructure/v2, in the field processing component using mapstructure.WeakDecode. This vulnerability allows information disclosure through detailed error messages that may leak sensitive input values via malformed user-supplied data processed in security-critical contexts.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/go-viper/mapstructure/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-viper/mapstructure/security/advisories/GHSA-2464-8j7c-4cjm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-11065"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-viper/mapstructure/commit/742921c9ba2854d27baa64272487fc5075d2c39c"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2025-11065"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2391829"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-viper/mapstructure"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-117" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-27T21:00:31Z",
    "nvd_published_at" : "2026-01-26T20:16:06Z"
  }
}