{"id":"CVE-2026-48758","aliases":["CVE-2026-48758","GHSA-jfc7-64v2-mr8c"],"related":[],"kind":"vulnerability","state":"published","title":"sigstore-js: DSSE payloadType type-binding failure","summary":"sigstore-js provides JavaScript libraries for interacting with Sigstore services. Prior to 3.2.1, the preAuthEncoding function in @sigstore/core uses Node.js ascii encoding when converting the PAE string to bytes, allowing payloadType to be mutated after signing without invalidating the signature and breaking the type-binding guarantee that DSSE is designed to provide. This issue is fixed in version 3.2.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"sigstore-js provides JavaScript libraries for interacting with Sigstore services. Prior to 3.2.1, the preAuthEncoding function in @sigstore/core uses Node.js ascii encoding when converting the PAE string to bytes, allowing payloadType to be mutated after signing without invalidating the signature and breaking the type-binding guarantee that DSSE is designed to provide. This issue is fixed in version 3.2.1.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe `preAuthEncoding` function in `@sigstore/core` uses Node.js `'ascii'` encoding when converting the PAE (Pre-Authentication Encoding) string to bytes. This allows `payloadType` to be mutated after signing without invalidating the signature, breaking the type-binding guarantee that DSSE is designed to provide.\n\nIn `packages/core/src/dsse.ts`, the PAE function builds a string containing `payloadType` and then encodes it with `Buffer.from(prefix, 'ascii')`.\n\nIn Node.js, `'ascii'` encoding for string-to-Buffer is equivalent to `'latin1'`, which **truncates characters above U+00FF to their low byte**. This means for any ASCII character, there exist Unicode characters (at U+01xx, U+02xx, etc.) that produce the identical encoded byte:\n\n| Original | Codepoint | Mutant | Codepoint | Encoded byte |\n|----------|-----------|--------|-----------|--------------|\n| `t`      | U+0074    | `Ŵ`    | U+0174    | `0x74`       |\n| `e`      | U+0065    | `ť`    | U+0165    | `0x65`       |\n\nAn attacker can substitute every character in `payloadType` with a Unicode variant whose low byte matches, producing **identical PAE bytes** and a passing signature verification.\n\nAdditionally, `payloadType.length` returns the JavaScript string length (UTF-16 code units) rather than the UTF-8 byte length required by the DSSE spec, though this is only a contributing factor for non-ASCII types.\n\n#### Reproduction\n\n```javascript\nconst { preAuthEncoding } = require('@sigstore/core/dist/dsse.js');\nconst payload = Buffer.from('hello world');\n\nconst original = preAuthEncoding('text/plain', payload);\n// U+01xx chars whose low bytes match the original ASCII chars\nconst mutant = preAuthEncoding('\\u0174\\u0165\\u0178\\u0174/\\u0170\\u016c\\u0161\\u0169\\u016e', payload);\n\nconsole.log('PAE bytes equal:', original.equals(mutant)); // true — should be false\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"sigstore-js proporciona bibliotecas JavaScript para interactuar con los servicios Sigstore. Antes de la 3.2.1, la función preAuthEncoding en @sigstore/core utiliza la codificación ascii de Node.js al convertir la cadena PAE a bytes, permitiendo que payloadType sea mutado después de la firma sin invalidar la firma y rompiendo la garantía de vinculación de tipo que DSSE está diseñado para proporcionar. Este problema está solucionado en la versión 3.2.1.","source":"nvd"}],"published":"2026-06-26T19:11:19.000Z","modified":"2026-10-24T21:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"version":"< 3.2.1","status":"affected"}],"vendor":"sigstore","product":"sigstore-js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.1"}],"ecosystem":"npm","package":"@sigstore/core","purl":"pkg:npm/%40sigstore/core","source":"ghsa"}],"references":[{"url":"https://github.com/sigstore/sigstore-js/security/advisories/GHSA-jfc7-64v2-mr8c","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sigstore/sigstore-js/pull/1657","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sigstore/sigstore-js/commit/b5aa4f1f8d2db0a9dfa6430fb114d9c2f1c304f7","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sigstore/sigstore-js/releases/tag/%40sigstore%2Fcore%403.2.1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sigstore/sigstore-js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-15T12:54:43.124Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48758","url":"https://www.cve.org/CVERecord?id=CVE-2026-48758","licence":"CVE Terms of Use","modified":"2026-07-15T12:54:55.445Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jfc7-64v2-mr8c","url":"https://github.com/advisories/GHSA-jfc7-64v2-mr8c","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:08.786Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48758","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48758","licence":"Public domain","modified":"2026-10-24T21:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:28.225Z","epss":{"score":0.00239,"percentile":0.15995,"date":"2026-12-01T12:00:22.000Z"}}