Skip to content

DigestInfo validation to prevent RSA-PKCS#1 v1.5 signature forgery - #1151

Closed
Zelzazor wants to merge 2 commits into
digitalbazaar:mainfrom
Zelzazor:issue-1149-rsa-pkcs-signature-forgery
Closed

DigestInfo validation to prevent RSA-PKCS#1 v1.5 signature forgery#1151
Zelzazor wants to merge 2 commits into
digitalbazaar:mainfrom
Zelzazor:issue-1149-rsa-pkcs-signature-forgery

Conversation

@Zelzazor

@Zelzazor Zelzazor commented Sep 5, 2026

Copy link
Copy Markdown

Fixes #1149.

Basically, validation of DigestInfo structure in verify() function for RSA PKCS#1 v1.5 in rsa.js was not validating any nested properties located between the required parts of said structure, allowing a forged signature to pass.

I've made an additional check inside the if of the DigestInfo structure validation, in order to check what is the length of the captured DigestAlgorithm, and compare it to it's only possible values.

A regression test was made inside tests/unit/rsa.js to detect the forged signature. Test was executed before making the change with an expected fail state. Then executed the full test suite: 816 passing, 0 failing.

Created a CHANGELOG entry documenting the fix and a CVE reference.

CVE: CVE-2026-85393

@Zelzazor

Copy link
Copy Markdown
Author

Closed in favor of #1152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSA PKCS#1 v1.5 signature forgery via garbage in DigestAlgorithm (incomplete CVE-2026-33894 fix)

1 participant