GHSA-6c87-g9pw-78fx: Github.com/edgelesssys/contrast Contrast's Imagepuller RegistryFor Uses Unanchored Vulnerability
LOWGHSA-6c87-g9pw-78fx is a LOW (CVSS 3.7) contrast's imagepuller registryfor uses unanchored vulnerability (CWE-1289: Improper Validation of Unsafe Equivalence in Input) affecting Github.com/edgelesssys/contrast libraries in the Go ecosystem. The issue involves contrast's imagepuller registryfor uses unanchored suffix matching, leaking auth credentials and trusted ca configuration to sibling-domain registries. Remediation is available by upgrading affected packages to version 1.21.0.
GHSA-6c87-g9pw-78fx at a Glance
Security Impact
CVSS: 3.7
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:N/S:U/C:L/I:N/A:N).
How to Fix GHSA-6c87-g9pw-78fx
To remediate this vulnerability, upgrade all affected Github.com/edgelesssys/contrast dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/edgelesssys/contrast to 1.21.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/edgelesssys/contrast
How to Check if You Are Affected
To determine whether your application is affected by GHSA-6c87-g9pw-78fx, inspect your project dependencies for Github.com/edgelesssys/contrast:
inspect dependencies for github.com/edgelesssys/contrast
Analyze the terminal output to locate any version of Github.com/edgelesssys/contrast in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & RFC 5280 Specification
Under RFC 5280 specifications for X.509 certificates, the Name Constraints extension defines a namespace within which all subsequent subject names in a certification path must be located. Constraints apply to various name forms including directory names, IP addresses, rfc822Name (email addresses), and uniformResourceIdentifier (URI) entries. Specifically, during certificate path validation, affected versions of Github.com/edgelesssys/contrast failed to properly normalize or enforce boundary checks when domain names contained trailing dot (.) characters. Because domain names with a trailing dot signify fully qualified domain names (FQDNs), this omission allowed non-conforming certificates to be improperly validated as compliant with the defined name constraints.
Source Advisory Statement
GHSA-6c87-g9pw-78fx Affected Github.com/edgelesssys/contrast Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/edgelesssys/contrast
|
Go |
< 1.21.0
|
1.21.0
|
References
Frequently Asked Questions
What is GHSA-6c87-g9pw-78fx?
Which Github.com/edgelesssys/contrast versions are affected?
What version fixes GHSA-6c87-g9pw-78fx?
Is github.com/edgelesssys/contrast affected?
What is the CVSS score of GHSA-6c87-g9pw-78fx?
What CWE is associated with GHSA-6c87-g9pw-78fx?
How can I check Go dependencies for GHSA-6c87-g9pw-78fx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6c87-g9pw-78fx",
"modified" : "2026-07-01T18:43:56Z",
"published" : "2026-07-01T18:43:55Z",
"aliases" : [ ],
"summary" : "Contrast's Imagepuller registryFor uses unanchored suffix matching, leaking auth credentials and trusted CA configuration to sibling-domain registries",
"details" : "# Summary\n\n`Config.registryFor` selected a per-registry credential / CA / mirror block by checking `strings.HasSuffix(name, fqdn)` after stripping a single trailing dot. \nThe match has no boundary between the configured FQDN and any preceding characters in the request hostname.\nA registry configured as `[registries.\"ghcr.io.\"]` is therefore also applied to any image pulled from a host whose name happens to end in the literal byte sequence `ghcr.io`, \nincluding attacker-registered domains such as `evilghcr.io.` \nThe imagepuller would then send the configured `Authorization` header (basic auth, registry token, or identity token), trust the configured custom CA bundle,\nfollow the configured mirror, or honour `insecure-skip-verify`, on requests to that hostname.\n\n# Prerequisites\n\nFor this to be applicable, an image or layer must be pulled from a \"sibling\" domain ending in one of the FQDNs configured in the imagepuller config.\nThis may occur due to malicious intent or coincidentally.\n\n# Impact\n\n- Authentication header leaks to the sibling registry.\n- If `insecure-skip-verify` is set on an FQDN, TLS will also not be verified for the sibling registry.\n- Mirrors configured for an FQDN will also be used with the sibling registry.\n\n## Not impacted\n\nImage integrity is **not** impacted. Image bytes remain pinned by digest in the policy and are validated after the pull.\nThis advisory does not allow code substitution.\n\n# Workaround\n\n- If possible, configure explicit subdomains in the imagepuller config. A configuration for `[registries.\".example.registry\"]` is unaffected, only `[registries.\"example.registry\"]` is potentially affected.\n- Audit images and layers configured in the deployment for the existence of sibling domains.\n\n# Patches\n\nAfter this patch, registry matches are determined by exact label equality instead of suffix matching.\nEach `.`-separated part of the FQDN must be an exact match with the corresponding label in the image reference.\n\n# Severity\n\n- `AV:N` because the leak is over the network to a registry under the attacker's control. \n- `AC:H` because exploitation requires the operator to have configured a registry FQDN without a leading `.` AND the attacker to control a sibling-suffix domain that the deployment will pull from.\n- `PR:N` for the eventual recipient. \n- `S:U` because impact stays in the imagepuller. \n- `C:L` for credential leak (no integrity / availability impact).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgelesssys/contrast"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.21.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.20.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/security/advisories/GHSA-6c87-g9pw-78fx"
}, {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/commit/10826b1d82613025767fb094e8aa51a7dcfbd2a1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/edgelesssys/contrast"
}, {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/releases/tag/v1.21.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1289" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-01T18:43:55Z",
"nvd_published_at" : null
}
}