Preflight Checklist

  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • [x] I am not looking for support or already pursued the available support channels without success.
  • [x] I have checked the troubleshooting guide for my problem, without success.

Viper Version

1.20.1

Go Version

1.18

Config Source

Environment variables

Format

YAML

Repl.it link

No response

Code reproducing the issue

General package import

Expected Behavior

No security issues found by socket security scanner

Actual Behavior

golang/golang.org/x/oauth2@v0.25.0 has a High CVE. CVE: GHSA-6v2p-p543-phr9 golang.org/x/oauth2 Improper Validation of Syntactic Correctness of Input vulnerability (HIGH)

Affected versions: < 0.27.0

Patched version: 0.27.0

From: ? → golang/github.com/spf13/viper@v1.20.1 → golang/golang.org/x/oauth2@v0.25.0

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore golang/golang.org/x/oauth2@v0.25.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Steps To Reproduce

No response

Additional Information

Looks like it just needs a bump up.

Comment From: gades

Vulnerability #1: GO-2025-3787 May leak sensitive information in logs when processing malformed data in github.com/go-viper/mapstructure More info: https://pkg.go.dev/vuln/GO-2025-3787 Module: github.com/go-viper/mapstructure/v2 Found in: github.com/go-viper/mapstructure/v2@v2.2.1 Fixed in: github.com/go-viper/mapstructure/v2@v2.3.0 Example traces found: #1: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls errors.As #2: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls errors.Join #3: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls errors.New #4: internal/config.go:14:2: internal.init calls viper.init, which eventually calls errors.init #5: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls mapstructure.ComposeDecodeHookFunc #6: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls mapstructure.Decoder.Decode #7: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls mapstructure.NewDecoder #8: internal/config.go:375:28: internal.init#1 calls viper.Viper.UnmarshalExact, which eventually calls mapstructure.StringToTimeDurationHookFunc #9: internal/config.go:14:2: internal.init calls viper.init, which calls mapstructure.init

Comment From: ofaurax

PR is #2048

Comment From: sagikazarmark

There is a new release coming that should fix that.

Comment From: sagikazarmark

Should be fixed by 1.21