Safeguard
Security Guides•

Should you patch the monolith or wait for the rewrite to finish?

Patch the monolith when the flaw is reachable, exposed or exploited, even if replacement is planned. Here is a decision guide for waiting versus fixing.

Safeguard Security Team
3 min read

Patch now if the vulnerable code is reachable, the component is exposed to the internet, or the flaw is known to be exploited. Waiting for the rewrite is defensible only for low exposure findings with a firm retirement date and a compensating control.

Why "it will be replaced soon" is risky

Modernization schedules slip. Microsoft's guidance says the original system can continue to exist for an extended period of time during migration. Fowler makes a related point: replacing a serious system takes a long time. A component planned for retirement in six months may still be in production in eighteen.

Attackers do not check your roadmap. If a flaw is exploited in the wild, the retirement date does not matter.

A decision guide

Answer these questions in order for each finding.

  1. Is it on CISA's Known Exploited Vulnerabilities list? CISA describes the catalog as an input to prioritization, since it lists flaws exploited in the wild. If yes, fix or mitigate now.
  2. Is the vulnerable code reachable from your application? If no, the urgency falls.
  3. Is the component reachable from outside your network, directly or through the facade? If yes, urgency rises.
  4. Does a safe fix exist? If a patched version is available and tests pass, applying it is usually cheap.
  5. When exactly will the component be retired, and who has committed to that date? A vague "next year" is not a plan.
SituationSuggested action
Exploited, exposedPatch or mitigate immediately
Reachable, internal onlyPatch within your normal window
Not reachable, exposedPatch when convenient, add monitoring
Not reachable, internal, retiring within weeksAccept with expiry

Compensating controls when you cannot patch

  • Block the vulnerable path at the facade or a web application firewall rule
  • Restrict network access to the component
  • Disable the unused feature that contains the flaw
  • Add detection for the known exploit pattern

These are stopgaps. Record an owner and a review date for each one.

Keep the effort proportional

Patching the legacy app does not have to mean a large upgrade. Often the fix is a minor version bump of a single transitive library. Low effort fixes are worth taking even on code that is being retired, because they close real exposure for little cost.

Avoid the opposite trap as well. Rewriting a library call in a module that will be deleted next sprint wastes effort. Let the decision guide above separate the two.

Document the decision

Whichever way you go, write down the finding, the decision, the owner and the date. Auditors and customers ask about exceptions, and a clear record is far better than a memory. Our post on legacy SAST debt burn down shows one way to schedule this work.

Safeguard's reachability analysis and policies help with steps two and three, and fix pull requests, which are off by default, can propose safe version bumps for review when you turn them on.

Quick check

Can we skip patching if the module is being deleted?

Only for low exposure findings with a committed, near term deletion date. Otherwise patch or mitigate.

What counts as a compensating control?

Anything that blocks or detects exploitation without changing the vulnerable code, such as restricting network access.

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.