{"id":"CVE-2025-11065","aliases":["CVE-2025-11065","GHSA-2464-8j7c-4cjm","GO-2025-3900"],"related":["CGA-4v52-6cgq-vcv9"],"kind":"vulnerability","state":"published","title":"Github.com/go-viper/mapstructure/v2: go-viper's mapstructure may leak sensitive information in logs in github.com/go-viper/mapstructure","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nUse of this library in a security-critical context may result in leaking sensitive information, if used to process sensitive fields.\n\n### Details\n\nOpenBao (and presumably HashiCorp Vault) have surfaced error messages from `mapstructure` as follows:\n\nhttps://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/field_data.go#L43-L50\n\n```go\n\t\t\t_, _, err := d.getPrimitive(field, schema)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error converting input for field %q: %w\", field, err)\n\t\t\t}\n```\n\nwhere this calls `mapstructure.WeakDecode(...)`: https://github.com/openbao/openbao/blob/98c3a59c040efca724353ca46ca79bd5cdbab920/sdk/framework/field_data.go#L181-L193\n\n```go\n\nfunc (d *FieldData) getPrimitive(k string, schema *FieldSchema) (interface{}, bool, error) {\n\traw, ok := d.Raw[k]\n\tif !ok {\n\t\treturn nil, false, nil\n\t}\n\n\tswitch t := schema.Type; t {\n\tcase TypeBool:\n\t\tvar result bool\n\t\tif err := mapstructure.WeakDecode(raw, &result); err != nil {\n\t\t\treturn nil, false, err\n\t\t}\n\t\treturn result, true, nil\n```\n\nNotably, `WeakDecode(...)` eventually calls one of the decode helpers, which surfaces the original value via `strconv` helpers:\n\nhttps://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/mapstructure.go#L720-L727\n\nhttps://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/mapstructure.go#L791-L798\n\nhttps://github.com/go-viper/mapstructure/blob/8c61ec1924fcfa522f9fc6b4618c672db61d1a38/decode_hooks.go#L180\n\n& more. These are different code paths than are fixed in the previous iteration at https://github.com/go-viper/mapstructure/security/advisories/GHSA-fv92-fjc5-jj9h.\n\n### PoC\n\nTo reproduce with OpenBao:\n\n```\n$ podman run --pull=always -p 8300:8300 openbao/openbao:latest server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8300\n```\n\nand in a new tab:\n\n```\n$ BAO_TOKEN=root BAO_ADDR=http://localhost:8300 bao auth enable userpass\nSuccess! Enabled userpass auth method at: userpass/\n$ curl -X PUT -H \"X-Vault-Request: true\" -H \"X-Vault-Token: root\" -d '{\"ttl\":\"asdf\"}' \"http://localhost:8200/v1/auth/userpass/users/asdf\"\n\n--> server logs:\n\n2025-06-25T21:32:25.101-0500 [ERROR] core: failed to run existence check: error=\"error converting input for field \\\"ttl\\\": time: invalid duration \\\"asdf\\\"\"\n```\n\n### Impact\n\nThis is an information disclosure bug with little mitigation. See https://discuss.hashicorp.com/t/hcsec-2025-09-vault-may-expose-sensitive-information-in-error-logs-when-processing-malformed-data-with-the-kv-v2-plugin/74717 for a previous version. That version was fixed, but this is in the second part of that error message (starting at `'' expected a map, got 'string'` -- when the field type is `string` and a `map` is provided, we see the above information leak -- the previous example had a `map` type field with a `string` value provided).\n\nThis was rated 4.5 Medium by HashiCorp in the past iteration.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Go-viper's mapstructure May Leak Sensitive Information in Logs in github.com/go-viper/mapstructure","format":"markdown","source":"go"},{"lang":"es","text":"Se encontró una falla en github.com/go-viper/mapstructure/v2, en el componente de procesamiento de campos que utiliza mapstructure.WeakDecode. Esta vulnerabilidad permite la revelación de información a través de mensajes de error detallados que pueden filtrar valores de entrada sensibles a través de datos malformados proporcionados por el usuario procesados en contextos críticos para la seguridad.","source":"nvd"}],"published":"2025-08-21T14:37:19.000Z","modified":"2026-11-24T07:17:18.027Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-117","CWE-209"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2.4.0","status":"affected"}],"package":"github.com/go-viper/mapstructure/v2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"OpenShift Pipelines","package":"openshift-pipelines-client","cpe":"cpe:/a:redhat:openshift_pipelines:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","package":"rhacm2/acm-grafana-rhel9","cpe":"cpe:/a:redhat:acm:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","package":"rhacm2/submariner-rhel9-operator","cpe":"cpe:/a:redhat:acm:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-central-db-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-main-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-rhel8-operator","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-roxctl-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-scanner-v4-db-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4","package":"advanced-cluster-security/rhacs-scanner-v4-rhel8","cpe":"cpe:/a:redhat:advanced_cluster_security:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Certification for Red Hat Enterprise Linux 8","package":"redhat-certification-preflight","cpe":"cpe:/a:redhat:certifications:1::el8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Certification Program for Red Hat Enterprise Linux 9","package":"redhat-certification-preflight","cpe":"cpe:/a:redhat:certifications:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"gvisor-tap-vsock","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"opentelemetry-collector","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"toolbox","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"gvisor-tap-vsock","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"opentelemetry-collector","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"toolbox","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-model-registry-rhel9","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift AI (RHOAI)","package":"rhoai/odh-rhel9-operator","cpe":"cpe:/a:redhat:openshift_ai","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"microshift","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift4/ose-helm-operator","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift4/ose-helm-rhel9-operator","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"podman","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/traefik-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/udi-base-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Dev Spaces","package":"devspaces/udi-rhel9","cpe":"cpe:/a:redhat:openshift_devspaces:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift distributed tracing 3","package":"rhosdt/opentelemetry-collector-rhel8","cpe":"cpe:/a:redhat:openshift_distributed_tracing:3","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","package":"openshift-gitops-1/argocd-rhel8","cpe":"cpe:/a:redhat:openshift_gitops:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift GitOps","package":"openshift-gitops-1/argocd-rhel9","cpe":"cpe:/a:redhat:openshift_gitops:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Application Pipeline","package":"rhtap-task-runner/rhtap-task-runner-rhel9","cpe":"cpe:/a:redhat:trusted_application_pipeline:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/cosign-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/fulcio-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/gitsign-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/rekor-backfill-redis-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/rekor-cli-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/rekor-server-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Trusted Artifact Signer","package":"rhtas/timestamp-authority-rhel9","cpe":"cpe:/a:redhat:trusted_artifact_signer:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Zero Trust Workload Identity Manager - Tech Preview","package":"zero-trust-workload-identity-manager/spiffe-spire-agent-rhel9","cpe":"cpe:/a:redhat:zero_trust_workload_identity_manager:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Zero Trust Workload Identity Manager - Tech Preview","package":"zero-trust-workload-identity-manager/spiffe-spire-oidc-discovery-provider-rhel9","cpe":"cpe:/a:redhat:zero_trust_workload_identity_manager:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Zero Trust Workload Identity Manager - Tech Preview","package":"zero-trust-workload-identity-manager/spiffe-spire-server-rhel9","cpe":"cpe:/a:redhat:zero_trust_workload_identity_manager:0","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Zero Trust Workload Identity Manager - Tech Preview","package":"zero-trust-workload-identity-manager/zero-trust-workload-identity-manager-rhel9","cpe":"cpe:/a:redhat:zero_trust_workload_identity_manager:0","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.4.0"}],"ecosystem":"Go","package":"github.com/go-viper/mapstructure/v2","purl":"pkg:golang/github.com/go-viper/mapstructure/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/go-viper/mapstructure","purl":"pkg:golang/github.com/go-viper/mapstructure","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.4.0"}],"ecosystem":"Go","package":"github.com/go-viper/mapstructure/v2","purl":"pkg:golang/github.com/go-viper/mapstructure/v2","source":"go"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2025-11065","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2391829","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/go-viper/mapstructure/commit/742921c9ba2854d27baa64272487fc5075d2c39c","tags":["fix","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/go-viper/mapstructure/security/advisories/GHSA-2464-8j7c-4cjm","tags":["advisory","exploit","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-11065","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/go-viper/mapstructure","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2025-3900","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-02-03T19:21:11.932Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-11065","url":"https://www.cve.org/CVERecord?id=CVE-2025-11065","licence":"CVE Terms of Use","modified":"2026-11-24T06:25:59.878Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2464-8j7c-4cjm","url":"https://github.com/advisories/GHSA-2464-8j7c-4cjm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:26.445Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3900","url":"https://pkg.go.dev/vuln/GO-2025-3900","licence":"CC-BY-4.0","modified":"2026-08-07T08:11:50.208Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-11065","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-11065","licence":"Public domain","modified":"2026-11-24T07:17:18.027Z"}],"updatedAt":"2026-11-25T22:59:10.867Z","epss":{"score":0.00519,"percentile":0.45583,"date":"2026-12-01T12:00:22.000Z"}}