{"answers":{"affected":"3 open source packages ship an affected version, including github.com/opentofu/opentofu.","exploited":"There is no known exploitation of GHSA-mjcp-gpgx-ggcg in the wild and no public exploit code.","fix":"Upgrade github.com/opentofu/opentofu to 1.10.8 or later.","what":"GHSA-mjcp-gpgx-ggcg is a vulnerability in github.com/opentofu/opentofu, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-mjcp-gpgx-ggcg and fix it if it is affected.\n\nWhat it is: GHSA-mjcp-gpgx-ggcg is a vulnerability in github.com/opentofu/opentofu, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-mjcp-gpgx-ggcg in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.10.8\n- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.10.8\n- github.com/opentofu/opentofu (Go): affected all versions; fixed in 1.10.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-mjcp-gpgx-ggcg/ (Markdown: https://insights.sbomify.com/GHSA-mjcp-gpgx-ggcg/index.md)","id":"GHSA-mjcp-gpgx-ggcg","markdown":"https://insights.sbomify.com/GHSA-mjcp-gpgx-ggcg/index.md","name":"GHSA-mjcp-gpgx-ggcg","record":{"aliases":["GO-2025-4224"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Infrastructure as Code tool","requires_auth":"none","summary":"OpenTofu fails to enforce excluded subdomain constraints against wildcard SANs, allowing attackers to bypass TLS certificate validation checks.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"When OpenTofu is acting as a TLS client authenticating a certificate chain provided by a TLS server, an excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard [SANs](https://en.wikipedia.org/wiki/Public_key_certificate#Subject_Alternative_Name_certificate) in the leaf certificate.\n\nFor example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com.\n\n### Details\n\nWhen acting as a TLS client, OpenTofu relies on the implementation of TLS certificate verification from the standard library of the Go programming language.\n\nThe Go project has recently published the following advisory for that which indirectly affects OpenTofu's behavior:\n\n- [CVE-2025-61727](https://www.cve.org/CVERecord?id=CVE-2025-61727): Improper application of excluded DNS name constraints when verifying wildcard names in crypto/x509\n\nOpenTofu acts as a TLS client when calling a module or provider registry to request metadata, when downloading module or provider packages from \"https\" URLs, and when interacting with remote services for state storage and encryption. In these situations, OpenTofu could potentially accept as valid a certificate chain containing conflicting information about whether it is valid for the target hostname.\n\nAll certificates in the chain are still checked separately for validity, and so a successful attack requires an attacker-controlled server to produce a chain of valid-but-contradictory certificates and have access to the private keys associated with each one, and for the attacker to then arrange for OpenTofu to attempt to connect to the affected hostname.\n\n### Patches\n\nOpenTofu v1.10.8 addresses these vulnerabilities by being built against Go 1.24.11, which contains an improved version of the upstream implementation.\n\nThe OpenTofu v1.9 and v1.8 series are also affected by these vulnerabilities. However, those series are built with a version of Go for which no upstream fix is available. Adopting Go 1.24.11 for those series would effectively end support for certain versions of macOS and Linux, and the OpenTofu Project has determined that the impact of these vulnerabilities is not high enough to justify that disruption in a patch release. For those using the OpenTofu v1.9 or v1.8 releases we recommend planning to upgrade to OpenTofu v1.10.8 in the near future.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"When OpenTofu is acting as a TLS client authenticating a certificate chain provided by a TLS server, an excluded subdomain constraint in a c","id":"GHSA-mjcp-gpgx-ggcg","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2025"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.10.8"],"introduced":["0"],"last_affected":[],"package":"github.com/opentofu/opentofu","purl":null,"source":"GHSA-mjcp-gpgx-ggcg"},{"ecosystem":"Go","fixed":["1.10.8"],"introduced":["0"],"last_affected":[],"package":"github.com/opentofu/opentofu","purl":"pkg:golang/github.com/opentofu/opentofu","source":"GHSA-mjcp-gpgx-ggcg"},{"ecosystem":"Go","fixed":["1.10.8"],"introduced":["0"],"last_affected":[],"package":"github.com/opentofu/opentofu","purl":"pkg:golang/github.com/opentofu/opentofu","source":"GO-2025-4224"}],"products":null,"published":"2025-12-09","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"OpenTofu fails to enforce excluded subdomain constraints against wildcard SANs, allowing attackers to bypass TLS certificate validation checks.","url":"https://insights.sbomify.com/GHSA-mjcp-gpgx-ggcg/"}