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

fix security vulnerability RUSTSEC-2024-0421 #138

Merged

Conversation

hallettj
Copy link
Collaborator

RUSTSEC-2024-0421 reports a vulnerability in the crate idna which is a dependency of a dependency of the mongodb rust driver. Specifically it interprets non-ASCII characters in domain names.

This change updates Cargo.lock to update two direct dependencies of the mongodb driver, hickory-proto and hickory-resolver from v0.24.1 to v0.24.2. That in turn updates the dependency on idna from v0.4 to v1.0.0 which is not affected by RUSTSEC-2024-0421. There are also a couple of small documentation updates here that are not relevant to the security fix, but that I want to get in. Those changes switch from a deprecated form of the nix flake command to the newer syntax.

MongoDB has an upstream fix for the driver which makes the same change: bumping the hickory dependencies to v0.24.2. That fix was made this morning, and is not available in the latest driver release which as of this writing is v3.1.0.

The vulnerability allows an attacker to craft a domain name that older versions of idna interpret as identical to a legitimate domain name, but that is in fact a different name. I think this does not impact the MongoDB connector since it uses the affected library exclusively to connect to MongoDB databases, and database URLs are supplied by trusted administrators. But best to get the fix anyway.

@hallettj hallettj self-assigned this Dec 10, 2024
@hallettj hallettj requested a review from codedmart December 10, 2024 20:33
@hallettj hallettj merged commit 25c870d into main Dec 10, 2024
1 check passed
@hallettj hallettj deleted the jessehallett/eng-1434-mongodb-vulnerability-in-idna-dependency branch December 10, 2024 21:47
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.

2 participants