Vulnerability Management · Topic 4 of 5
Mitigation and Remediation
Fix vulnerabilities the right way for CySA+: patching, compensating controls, exceptions, change management, validation rescans and secure coding fixes.
- 5 min
- Remediation removes the flaw, and mitigation reduces the risk while the flaw may remain.
- Patching is the default fix, but patches need testing, a window and a rollback plan.
- A compensating control gives similar risk reduction when the real fix is not possible.
What it is
Remediation fixes the cause of a vulnerability, for example by installing a patch. Mitigation reduces the risk without removing the flaw, for example by blocking access to the vulnerable service.
The analyst helps choose the right option, makes sure the work is tracked and approved, and confirms that the fix worked. Closing a ticket is not the same as closing the risk.
How it works
Options for dealing with a vulnerability
| Option | Description | When it fits |
|---|---|---|
| Patch or update | Install the vendor fix | Default choice when a fix exists and can be tested |
| Configuration change | Disable a feature, close a port, tighten a setting | The flaw is in an option you can turn off |
| Compensating control | Another control that reduces the same risk | No patch yet, or the system cannot be changed |
| Segmentation or isolation | Restrict who can reach the system | Legacy or fragile systems |
| Virtual patching | A web application firewall or intrusion prevention rule blocks the exploit pattern | Waiting for a real fix |
| Decommission | Remove the system or software | It is unused or end of life |
| Risk acceptance (exception) | Formally agree to live with the risk | Cost or impact of fixing is greater than the risk |
Choose a compensating control only if it addresses the same threat to a similar degree. It is a temporary or alternative answer, and it should be documented and reviewed.
Software and web application fixes
For flaws found in code, the fix is to change the code or the way it is built.
- Input validation checks that data has the expected type, length and format before use.
- Parameterised queries keep user input separate from database commands, which stops Structured Query Language (SQL) injection.
- Output encoding prevents injected scripts from running in a browser.
- Updating libraries replaces vulnerable third party components that software composition analysis identified.
- Secure session and credential handling removes hard coded secrets and weak session settings.
Patch management practice
- Track vendor advisories and the assets they affect.
- Test patches in a non production environment, because updates can break applications.
- Schedule installation in a maintenance window, with a rollback plan.
- Deploy in stages, starting with a pilot group.
- Verify that the update installed and that the service still works.
- Document the change and update the asset record.
Emergency patching shortens these steps for flaws under active attack, but the change should still be recorded.
Change management and governance
A change request records what will change, why, the risk, the schedule and the rollback. Approval by a change board gives a controlled and auditable process.
Many organisations set service level targets for remediation by severity, such as a short deadline for critical items and a longer one for low items. The exact numbers are set by policy and differ between organisations.
An exception or risk acceptance should name the owner, the reason, the compensating controls, an expiry date and an approver with authority. It is not a permanent way to ignore a finding.
Validation
After the fix, confirm it worked.
- Rescan the affected systems and check that the finding is gone.
- Verify manually where a scan cannot confirm it, such as checking a configuration value.
- Test the service to confirm it still works.
- Update records and close the ticket only after validation.
- Watch for recurrence, since an old image or script may bring the flaw back.
Before: 192.0.2.40 443/tcp TLS Version 1.0 Protocol Detection High Open
After: 192.0.2.40 443/tcp TLS Version 1.0 Protocol Detection Not present
Action: close ticket, record rescan date, keep the host in the next scheduled scan
Reducing the attack surface
Remediation also includes removing what should not exist: unused services, open ports, old accounts and default settings. Hardening to a secure baseline, such as a vendor or Center for Internet Security (CIS) benchmark, prevents many findings from appearing.
What to remember for the exam
- Remediation removes the flaw, and mitigation reduces the risk while the flaw may remain.
- Patching is the default fix, but patches need testing, a window and a rollback plan.
- A compensating control gives similar risk reduction when the real fix is not possible.
- Virtual patching uses a web application firewall or intrusion prevention rule to block exploitation.
- Parameterised queries and input validation address injection flaws in code.
- A risk exception needs an owner, a reason, an approver and a review date.
- Always validate by rescanning, and confirm that the service still works.
- Change management keeps fixes controlled and auditable.
- Segmentation protects systems that cannot be patched.
Do not apply patches to critical production systems without testing and a rollback plan. A rushed update can cause the very outage you are trying to avoid.
Common mistakes
Closing the ticket after the patch is deployed. Until a rescan confirms the fix, the finding is not proven closed.
Using compensating controls as a permanent answer. They should be reviewed, and replaced by a real fix when possible.
Accepting risk without authority. A technician cannot accept a business risk, so the decision belongs to an accountable owner.
Skipping testing. Updates may break dependencies and cause downtime.
Forgetting the code fix. Blocking an attack with a firewall rule does not remove the weak code.
Check yourself
What is the difference between remediation and mitigation?
Remediation removes the vulnerability, while mitigation lowers the risk without necessarily removing it.
When is a compensating control appropriate?
When the vulnerability cannot be fixed at once, for example because no patch exists or the system cannot be changed, and the control reduces the same risk.
What proves that a patch worked?
A validation step such as a rescan or manual check showing the finding is gone and the service still works.
Topic 4 of 5 in Vulnerability Management
Test yourself on Vulnerability Management
The full CompTIA CySA+ CS0-004 question bank has 654 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by CompTIA. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.