Skip to content
Bugsieve
Security guides

How to fix a vulnerable dependency

Updated October 13, 2026

Most vulnerable dependencies are fixed by upgrading to a newer version. The work is in finding the right version, dealing with libraries you did not add yourself, and checking that the flaw is really gone.

1. Find the fixed version

Every advisory lists the first version that contains the fix. Pick that version or a later one in the same major release, so the upgrade is least likely to break your code. A Bugsieve report shows the vulnerable version and the fix version side by side.

2. Upgrade a direct dependency

If the library is in your own dependency file, raise the version there and update the lock file with your package manager, for example npm install [email protected], composer update vendor/pkg or pip install -U pkg. Commit the lock file too, because it decides what is actually installed.

3. Handle a transitive dependency

Often the vulnerable library is pulled in by another library. First upgrade the parent, since a newer release may already use a fixed child. If it has not, force the version with an override: overrides in npm, resolutions in Yarn, or a constraint in your lock tooling. Remove the override once the parent catches up.

4. Check it worked

Run your tests, then scan again. If the finding is gone, the fix is in. If a flaw is not reachable from your code and no fix exists yet, record that decision with a VEX statement so the alert is not raised again and again. Start with flaws on the CISA KEV list, since attackers already use those.

More guides