skip to content

What does mitigating a vulnerable dependency in place mean, and when do you do it instead of patching?

level: juniorimportance: must knowfreq 62%

answer

  1. buy time without changing versions
  2. close the path, not the flaw
  3. config flag, input, or network route
  4. must be visible in the running system
  5. temporary; the upgrade still has to land

basics

~20 s

Mitigating in place removes the attack path without changing the dependency version: disable the vulnerable feature by config, or block the network route that reaches it. Use it when the patch will take longer than the exposure is tolerable.

solid answer

~60 s

Remediation replaces the vulnerable component; mitigation closes the path to it while the vulnerable code is still installed. In practice that means one of three moves: turn off the vulnerable feature with a configuration flag, stop attacker-controlled input from reaching that code path, or cut the network route the exploit needs — for example a default-deny egress rule on the affected workloads. You reach for it when the gap between "we are exposed now" and "the patched build is everywhere" is longer than you can accept: a rollout that spans shifts, a fix that only exists in a major release, a build you cannot safely ship at 6pm on a Friday. Two rules keep it honest. A mitigation counts only if you can see it in the running system, not in a merged config file. And it buys hours or days, not closure — the version bump still has to land, and until it does the artifact you publish is still vulnerable for anyone downstream who does not have your config.

go deeper

for a junior

Be ready to say plainly that mitigation closes the attacker's path while the vulnerable version stays installed, and give one concrete example such as disabling the affected feature by configuration.

for a middle

Explain the three levers — feature flag, input, network route — and why you pick the one whose effect you can verify fastest in the running system rather than the one that sounds strongest.

for a senior

Show that you track mitigations as temporary state with an owner and an end condition, and that you can evidence a mitigation being live across every affected workload rather than in a merged file.

for a principal

Own the position that mitigation is a time-purchase, and be able to say what the organisation buys with those hours and what it owes downstream consumers who do not inherit your configuration.

## Two different words that get used as one **Remediation** changes what is installed: the vulnerable version of the component is replaced with one that does not contain the flaw. **Mitigation** leaves the vulnerable code exactly where it is and removes the attacker's route to it. Both reduce risk; only one of them makes the finding go away. Emergency response almost always uses mitigation first, because mitigation is usually a configuration change that takes minutes, while remediation is a build, a test cycle and a rollout. A vulnerability is the flaw in the code. An exploit is a working attack against it. Mitigation does not touch the flaw at all — it makes the exploit unable to reach it. ## The three families of in-place mitigation **1. Turn the vulnerable code path off.** Many advisories affect an optional feature: a parser for a format you do not use, a protocol handler, a template expansion, a deserialization mode. If the library exposes a flag that disables it, that is the cheapest mitigation available, because it does not require you to reason about where the input comes from. **2. Take the input away.** If the vulnerable path only fires on a particular kind of untrusted input, reject that input in front of the component — at the edge, in a validating layer, or by disabling the endpoint that accepts it. This is more fragile than a flag: you have to be right about every route into the code, and you may be wrong. **3. Take the network path away.** Many high-severity dependency flaws are only useful to an attacker if the compromised process can then reach something — an outbound callback, a lateral connection, a secrets endpoint. A default-deny egress rule on the affected workloads, or an access-control rule on the broker or service in front of them, breaks the exploit chain without touching the application. On a shared-runtime platform where you do not control the host, this is often the only lever you have. ## Choosing between them under time pressure Prefer the mitigation whose correctness is easiest to *check*, not the one that feels strongest. A configuration flag either appears in the running process's effective configuration or it does not. An input filter depends on you having enumerated every path, which under incident pressure you have not. Rank the candidates by how quickly you can produce evidence the mitigation is live everywhere. A worked shape: a warehouse robot fleet runs a controller firmware that embeds a vulnerable message-broker client. Patched firmware exists, but over-the-air rollout across a fleet takes days because robots only update between shifts and a half-updated fleet is an operational hazard. The mitigation is server-side: an access-control rule on the broker that refuses the topic patterns the exploit needs, applied in one place, verifiable in one place, effective for every robot immediately. The asset being defended here is not customer data — it is the safety of a physical process — and the attacker position it assumes is someone who can already speak to the broker on the local network. Both of those shape which mitigation is worth anything. ## What a mitigation is not - **It is not closure.** The vulnerable code is still in the artifact. A flag can be flipped back, dropped by a later configuration refactor, or missed on a newly provisioned instance. Every mitigation needs an owner and a tracked expiry that ends with the real upgrade. - **It is not invisible to your scanner.** The component and version are unchanged, so tooling will keep reporting the finding. That is correct behaviour, not noise; if you want the tooling to reflect your analysis you need a separate, deliberate statement of status, which is its own discipline. - **It does not travel downstream.** If you publish an artifact — an image, a library, a firmware bundle — your consumers get the vulnerable component and none of your compensating configuration. A mitigation protects your deployment, not your customers' deployments of your product. - **It is not a substitute for knowing whether you were exposed before you applied it.** Mitigating forward does nothing about the window that already passed. ## Writing it down while you do it Record, at the time: what you disabled or blocked, on which workloads, who approved it, what the mitigation is expected to prevent, and what evidence shows it live. That record is what lets you answer, after the incident, the two questions that actually matter — were we exposed, and for how long — and it is what a post-incident review and any customer notification rest on. A mitigation nobody wrote down is indistinguishable, a week later, from a mitigation nobody applied.

  • You disabled the vulnerable feature by config. Why will your scanner still report the finding?
    Because the component and version in the artifact are unchanged, and that pair is what the scanner matches against the advisory. It has no view of your runtime configuration. Suppressing the alert to make it quiet hides a real exposure; if you want tooling to reflect the analysis, it has to be an explicit, justified status statement with an owner, not a silenced row.
  • Your product is an image other teams deploy. Does your config-flag mitigation help them?
    No. They pull the artifact, which still contains the vulnerable component, and they do not inherit your configuration. As the upstream you owe them either the patched build or a clear, published statement of what is affected and what configuration makes it safe. Treating your own mitigation as if it covered consumers is how a vendor ships a known-vulnerable release quietly.
  • How do you stop an emergency mitigation from becoming permanent?
    Give it an owner and an explicit end condition tied to the upgrade, not a date alone, and make the mitigation itself discoverable — a named flag or rule with a comment pointing at the advisory, rather than an undocumented line in a config. Review open mitigations on a fixed cadence; the ones nobody can explain are the ones that silently get removed by the next refactor.

A broken lock on an office door is the vulnerability. Replacing the lock is remediation. Sealing the corridor that leads to the door is mitigation: nobody can reach it tonight, but the lock is still broken and you still have to replace it.

saying these in an interview costs you the question

  • Calls the config flag the fix and closes the advisory ticket
  • Believes disabling a feature removes the vulnerable code from the artifact
  • Applies a network block without knowing which path the exploit needs
  • Verifies the mitigation by reading the merged config, not the running system
  • Assumes a local mitigation protects consumers of a published artifact

context