Skip to content

Fix Vagrant::Util::Keypair::Rsa.create Use of a broken or weak cryptographic algorithm #13708

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

opsysdebug
Copy link

fix the problem, replace the use of the weak des3 cipher with a strong, modern cipher such as aes-256-cbc when encrypting the private key. This involves changing the argument to OpenSSL::Cipher.new from 'des3' to 'aes-256-cbc' on line 147. No other changes are required, as OpenSSL supports this cipher natively and the rest of the code does not depend on the specific cipher used. This change is limited to the lib/vagrant/util/keypair.rb file, specifically within the Vagrant::Util::Keypair::Rsa.create method.

References

NIST, FIPS 140 Annex a: Approved Security Functions
NIST, SP 800-131A: Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths
OWASP: Rule - Use strong approved cryptographic algorithms

@opsysdebug opsysdebug requested a review from a team as a code owner August 15, 2025 13:43
Copy link

hashicorp-cla-app bot commented Aug 15, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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.

1 participant