You can first try cargo update to update the dependencies as best as you can. If it doesn't fix it, you can do a pr to those dependencies to update the subcrates
Rust Programming
If the version ranges for those dependencies which depend on vulnerable versions of packages cover the fixed versions as well, then just updating your Cargo.lock dependencies should pull the fixed versions. You can do this with cargo update.
If the ranges don't cover the fixes, you have a couple options:
- If the vulnerability doesn't affect you, do nothing.
- If it does affect you, you can patch the dependencies to a local version or one in a git branch.
If you choose to patch the dependency, the version of the patched package still needs to be compatible with what your dependencies are requesting. If foo v2.1.1 depends on bar = "3", then it can't use a patched bar v4.1.2 for example, but can use bar v3.3.4. You may need to backport a fix to an earlier version of a package in some cases. You can do that locally and use a path specifier in your patch for that.
In most cases, the vulnerability probably won't affect you. You should check to make sure though on a case-by-case basis.