Skip to content

Hard crash in generateKeyPair on bad type #62874

@ChALkeR

Description

@ChALkeR

@deepview-autofix flag:

Image

To reproduce:

require('crypto').generateKeyPair('toString', {}, console.log)
require('crypto').generateKeyPairSync('toString')

type is unlikely to be attacker-controlled without validation on the application side, so I don't think this is worth a private report and does not qualify as a vuln (also, DoS at most)

But should still be fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.securityIssues and PRs related to security.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions