Safeguard
Security Guides•

Does patching the OS fix vulnerable application dependencies?

No. OS updates replace packages in the system repository. Libraries in node_modules, virtual environments and jars need their own update. Here is why.

Safeguard Security Team
3 min read

No. Operating system patching updates the packages your distribution manages. Libraries your application installs through its own package manager, such as npm, pip, Maven or Cargo, live inside the project or image and are untouched. They need a separate update, rebuild and deploy.

Two inventories, two update paths

Every service has at least two sets of components.

  • System packages, installed by the OS package manager. Updates come from the vendor repository.
  • Application dependencies, resolved from a manifest and recorded in a lockfile. Updates come from a registry, and only when someone changes the manifest or lockfile.

The npm documentation describes the lockfile as recording the exact dependency tree so later installs recreate the same tree even after dependencies publish new versions. That is the point of a lockfile, and it is also why a vulnerable version stays put until you change it.

What this looks like in practice

Say a web service runs on a patched Linux host. The host has current OpenSSL from the vendor. The application still bundles an older JSON parser in its dependency folder. The host scan is clean, the application scan is not, and both are correct.

The reverse also happens. Application dependencies are current, but the base image has old system libraries because nobody rebuilt it.

ScenarioDoes an OS update help?
Vulnerable system library from the distroYes, once the vendor ships a fix
Vulnerable package in node_modulesNo
Vulnerable Python package in a virtual environmentNo
Vulnerable jar inside a fat jarNo
Statically linked binaryNo, it must be rebuilt

How to cover both

  1. Scan both layers. Use a host or image scan for system packages and a dependency scan for the lockfile.
  2. Rebuild on the OS side. Containers do not patch themselves. See rebuild container images regularly.
  3. Update on the app side. Use update pull requests that bump the manifest and lockfile, then run tests.
  4. Confirm what runs. Check the deployed artifact, not only the repository.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how many components come from the application layer, and how few would ever appear in an OS update list.

Where Safeguard fits

Safeguard's SBOM and dependency scanning inventories the application layer, and reachability analysis helps you decide which findings matter first. You can run a free scan on a project. See also why statically linked binaries ignore apt upgrades.

Quick check

Will apt or yum update my Python packages?

Only packages installed from the distribution repository. Packages installed with pip into a project or virtual environment are separate.

If my host scan is clean, am I covered?

You are covered for what the host scanner sees. Application dependencies need their own scan against the lockfile or the built artifact.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.