SECURE-SOFTWARE-DESIGN practice question 22 of 25

The security team has received notice of an insecure direct object reference vulnerability in a third- party component library that could result in remote code execution. The component library was replaced and is no longer being used within the application. How should the organization remediate this vulnerability?

Full set: 118 questions

Domain The Basics of Secure Software Design

Answer options
A: Ensure Sensitive Information Is Not Logged
B: Ensure Auditing and Logging Is Enabled on All Servers
C: Access to Configuration Files Is Limited to Administrators
D: Enforce the Removal of Unused Dependencies Correct answer
Correct Answer:
D. Enforce the Removal of Unused Dependencies
Explanation

The vulnerability is located within a third-party component that is no longer in use. Although the application's code may no longer call the library, the vulnerable code might still be included in the final build or deployment package. The most direct and effective remediation is to completely remove this unused dependency. This action eliminates the vulnerable code from the application's environment, thereby removing the associated attack surface. Maintaining a clean and minimal set of dependencies is a fundamental principle of secure software development and supply chain security.

Why Incorrect

A. This is a general security best practice but does not address the root cause, which is the presence of a vulnerable, unused code library.
B. Auditing and logging are detective controls used to identify potential exploitation; they do not remediate the underlying vulnerability.
C. Limiting access to configuration files is a valid security measure but is unrelated to removing vulnerable code from an unused dependency.

References

1. OWASP Top 10:2021, A06:2021 – Vulnerable and Outdated Components. In the "How to Prevent" section, OWASP explicitly recommends to: "Remove unused dependencies, unnecessary features, components, files, and documentation." This directly supports the removal of the unused, vulnerable library as the correct remediation step.

2. NIST Special Publication 800-218, Version 1.1, "Secure Software Development Framework (SSDF): Recommendations for Mitigating the Risk of Software Vulnerabilities." Practice PO.5, "Harden the development, compilation, and build environments," includes task PO.5.3: "Configure the build process to use features of the compiler, interpreter, and/or build tool that improve executable security." This encompasses ensuring that unused and vulnerable libraries are not linked or packaged into the final executable, effectively removing them.

3. Adkins, H., et al. (2020). Building Secure and Reliable Systems. O'Reilly Media. In Chapter 21, "Managing Software Dependencies," the authors state, "To reduce your attack surface, you should regularly audit your project’s dependencies and remove any that are no longer necessary." (p. 336). This highlights the industry best practice of actively managing and removing unused dependencies to enhance security.

Scroll to Top