Skip to content

CWE-326 | Hawk.js Contains Weak Hash Algorithm Β #75

@alivianmuir

Description

@alivianmuir

Summary

The hawk.js accepts SHA-1 credentials for authentication which is no longer considered cryptographically secure. With enough resources, an attacker might be able to crack the authentication mechanism and disclose sensitive information from the application.

Simplest Example to Reproduce

if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) {
    return ''
}

Possible Solution

if (credentials.algorithm !== 'sha256') {
    return ''
}

Context

This issue has been created as part of our SCA vulnerability remediation efforts.

Your Environment

The Cypress package is used for UAT automation in our Gitlab pipelines.

@cypress/request : 3.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions