Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alivianmuir opened this issue Sep 19, 2024 · 1 comment
Open

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

alivianmuir opened this issue Sep 19, 2024 · 1 comment

Comments

@alivianmuir
Copy link

alivianmuir commented Sep 19, 2024

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

@alivianmuir
Copy link
Author

@jennifer-shehane Thank you for reviewing this issue. Is this a fix that will be considered for patch release?

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

No branches or pull requests

1 participant