A legacy PHP app cannot be patched for months, and it has known vulnerabilities. How do you protect it in the meantime?
AdvancedScenarioVulnerability Management and OWASP
Answer
Situation read → We need compensating controls around an app we cannot fix, and a plan to retire or rewrite it.
What I'd do →
- Put it behind a WAF with managed rule sets (OWASP CRS, AWS managed rules) and virtual patches for the known CVEs.
- Restrict access: IP allowlist, VPN or identity-aware proxy if users allow it.
- Isolate the host: separate subnet, no outbound internet except required endpoints, minimal IAM.
- Read-only filesystem where possible; file integrity monitoring on the web root.
- Extra logging and alerting on that app; record a formal risk acceptance with a retirement date.
Why → Virtual patching buys time; isolation limits the damage if it is still exploited.
Interview tip → Always tie compensating controls to a deadline, or they become permanent.
More on Vulnerability Management and OWASP
A pentest report shows SQL injection in a search endpoint of a Java service. How do you handle it end to end?BeginnerA scanner reports 4,000 open CVEs across 300 images. The team can fix maybe 100 a month. How do you prioritise?IntermediateA user reports they can see another customer's invoice by changing the ID in the URL. What do you do?BeginnerA webhook feature lets users enter a URL, and a pentester used it to read the cloud metadata endpoint. How do you fix it?AdvancedA team still runs Log4j 2.14 in an internal service and says it is not internet-facing. How do you respond?IntermediateA security review finds passwords stored as unsalted MD5 hashes. How do you migrate without forcing every user to reset?Advanced