Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-jfc7-64v2-mr8c

Опубликовано: 26 июн. 2026
Источник: github
Github: Прошло ревью
CVSS3: 5.4

Описание

@sigstore/core has DSSE payloadType type-binding failure

Impact

The 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.

In packages/core/src/dsse.ts, the PAE function builds a string containing payloadType and then encodes it with Buffer.from(prefix, 'ascii').

In 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:

OriginalCodepointMutantCodepointEncoded byte
tU+0074ŴU+01740x74
eU+0065ťU+01650x65

An attacker can substitute every character in payloadType with a Unicode variant whose low byte matches, producing identical PAE bytes and a passing signature verification.

Additionally, 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.

Reproduction

const { preAuthEncoding } = require('@sigstore/core/dist/dsse.js'); const payload = Buffer.from('hello world'); const original = preAuthEncoding('text/plain', payload); // U+01xx chars whose low bytes match the original ASCII chars const mutant = preAuthEncoding('\u0174\u0165\u0178\u0174/\u0170\u016c\u0161\u0169\u016e', payload); console.log('PAE bytes equal:', original.equals(mutant)); // true — should be false

Пакеты

Наименование

@sigstore/core

npm
Затронутые версииВерсия исправления

<= 3.2.0

3.2.1

EPSS

Процентиль: 10%
0.00196
Низкий

5.4 Medium

CVSS3

Дефекты

CWE-347

Связанные уязвимости

CVSS3: 5.4
redhat
около 1 месяца назад

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.

CVSS3: 5.4
nvd
23 дня назад

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.

EPSS

Процентиль: 10%
0.00196
Низкий

5.4 Medium

CVSS3

Дефекты

CWE-347