ewents
How to Remove High-Risk Software from Production
← Back

How to Remove High-Risk Software from Production

Security failures can happen at any time, and sometimes attackers enter your systems through code your team didn't write (a.k.a. software dependencies). This blog covers how to remove high-risk software from production to limit the chances of a security breach.

Portrait of Valentin AlmironValentin AlmironNovember 17, 20268 min. read

For context, software libraries are reusable pieces of code that applications rely on. Instead of building every feature from scratch, software developers can add existing libraries to their projects that others built and published online. For example, if an engineer wants to add a payment feature to an application, they can use a library that helps process payments instead of building the entire functionality themselves. This saves time and effort, but it also means the application depends on code that the developer's team did not write or fully control.


The biggest security problem with third-party libraries is that malicious code can spread throughout your application, and you may not even notice a security gap because the application still works perfectly fine. This blog draws on insights from Valentin Almiron, our Sr. Application Security engineer, who covers the implications of using insecure third-party software and how to mitigate the risk.

Major security incidents involve code dependencies

Let’s start with the most recent security incident involving Axios, an open-source JavaScript library that helps applications request and send information to other services. Developers can install it through npm, a public registry for sharing software packages.


On March 31, 2026, attackers compromised an Axios maintainer’s account and published two malicious versions (1.14.1 and 0.30.4). These versions secretly installed malware that could give attackers remote access to affected computers. According to the Axios maintainer’s incident report, they remained available for about three hours before being removed.

Here’s the catch, though: removing those versions didn't mean companies were safe. If their developers had already installed them, the damage could have been done. So security teams had to investigate a few things:

  • Which systems were affected? They needed to identify developer computers and automated build systems that had installed the malicious versions.

  • What could have been exposed? They had to check whether the malware had executed and whether credentials, API keys, or other secrets were at risk.

  • Did it affect any software releases? They also needed to review applications built or released during the incident.

What makes this more concerning is that, as Microsoft explains, the malicious code could run during installation while the application continued working normally. So even a developer running a simple test on their computer could have been exposed, without anything ever reaching production.


I actually dealt with a similar situation involving the 2024 XZ Utils backdoor. One of our developers had installed an affected version locally, but fortunately, our automated security checks caught it before the code was merged into the main branch. Production was never affected, but we still had to investigate the developer's computer and credentials to make sure nothing had been compromised.


So where should security teams start? In my experience, the main problem is the lack of visibility. Based on decades of experience, I can assure you that most companies don't have full visibility into the software libraries they use, especially indirect or transitive dependencies (libraries that other libraries rely on). Unsafe dependencies typically enter through two main sources:

  • Third-party software: Companies often don't know which libraries their vendors use, so they depend on vendors to disclose security risks.

  • Developer environments: Developers may install libraries to solve problems quickly, sometimes based on AI suggestions, without checking whether they're secure.

For example, if you don't run a local build that pulls in all the libraries your software depends on, you might think everything is secure when you're actually using 5,000 dependencies, some of which could be vulnerable. That's why visibility matters: you need to know exactly what your software relies on, not only to identify security risks but also to respond quickly when something goes wrong. Case in point, the 2021 Log4j incident made this gap impossible to ignore. At that time, Snyk reported that 60% of the Java projects it monitored that used Log4j had it as an indirect dependency.

What to do when a software dependency becomes unsafe

Personally, I recommend the security team assess whether you can shut the service down and whether you can patch it. In some cases, shutting down a critical system could cause more disruption than the security risk itself. When that happens, teams can reduce the risk by isolating the affected server, restricting its internet access, and closely monitoring it for suspicious activity, while keeping the service running until a permanent fix is available. There are three things I usually look at:

  • Where did we use the affected version? I start by identifying every system that might have installed the vulnerable library, including production, test environments, developer computers, and build systems. To do this, I need absolute visibility into both direct and indirect dependencies. As I mentioned before, tools that only scan files like pom.xml or package.json can miss dependencies, so I usually look at the full dependency tree. I usually prefer Snyk for automated monitoring and alerts, or OWASP Dependency-Track as an open-source alternative that uses SBOMs.

  • What needs to be contained? Then, I evaluate how risky it would be to shut down the affected service. If malicious code may have been executed, I want to know which systems and credentials could be compromised. For instance, during the Axios incident, CISA recommended reviewing developer machines and build systems and replacing potentially exposed credentials. Depending on the situation, I might recommend isolating affected systems, restricting access, or temporarily shutting down a service until it's safe to operate again.

  • How do we confirm recovery? Finally, I want to make sure the problem is 100% resolved by verifying the fix. If downtime is a concern, I recommend a canary release, where we gradually roll out the updated version to a small percentage of users before deploying it everywhere. Generally, I also check for any remaining attacker access, exposed credentials, and the possibility of the unsafe version being installed again. If no fix is available yet, I make sure temporary protections are in place and that someone is accountable for monitoring the risk.

After going through these steps, I always document what the team fixed and any remaining risks, mostly to inform leadership and prevent another incident. If curious to learn more, Ewents recently published a similar situation with an airline vulnerability management project, where our team managed security risks without disrupting daily operations. Now that we’ve covered visibility, let’s look at how to mitigate risk.

How to reduce security risks from vulnerable dependencies

To reduce security risks, our team recommends running an internal simulation where you create a mock security alert related to a vulnerable dependency, and go through the motions of how quickly the team can identify affected systems, propose a fix, and determine that the issue has been resolved. Performing this kind of technical tabletop exercise is also a good opportunity to review outdated or unnecessary dependencies. Some libraries stay in applications for years without anyone questioning whether they're still needed. I recommend using this exercise to identify which libraries you can remove, which ones are still actively maintained, and whether they're receiving regular security updates.


Beyond running simulations, security teams also need to consider the growing role of AI, which is a double-edged sword. First, it's making cyberattacks easier and cheaper to carry out. Today, attackers can use AI models and automated tools to test different ways of breaking into a system, even with limited technical knowledge or resources. Because these attacks are cheaper to run, attackers can keep trying different approaches for longer without investing much time or money.


Secondly, AI is helping developers write code faster than ever, but that creates its own security challenges. With so much code being generated, it's becoming harder for developers to review every change carefully. Personally, I recommend keeping a human involved in every pull request, ideally supported by a dedicated AI security agent that can flag potential vulnerabilities, suspicious changes, and risks introduced by new dependencies (sometimes brought into the codebase by AI agents).


To wrap up, and looking ahead into 2027, every organization should scan for vulnerable dependencies as part of the secure software development process to mitigate security risks. Contact our team if you need support with a security assessment and would like additional guidance on how to remove security-critical dependencies from the code base.

Frequently Asked Questions

  • What is a software supply chain attack?

    A software supply chain attack is the direct attack to a component or service your organization relies on to build, deploy, or run software. For instance, an attacker could inject malicious code into an open-source library your developers already use so it spreads throughout the entire code base and applications. Note that because the compromised software package often times arrives through a normal update, your team might install it without realizing there's a security risk. In other words, by the time the attack is discovered, the malicious code could already be running in your applications, which is a complex situation to deal with.

  • How can you find out if your software uses a vulnerable library?

    To gain visibility into vulnerable libraries, our team recommends maintaining a Software Bill of Materials (SBOM), which lists the libraries your software uses, and using Software Composition Analysis (SCA) tools to scan them for known security vulnerabilities. This way, when a security alert comes out, your team can quickly identify which applications are affected and what needs to be fixed. We also suggest to scan indirect dependencies, since some libraries automatically install other libraries that could introduce security risks.

  • Can our software be affected by a library we didn’t install directly?

    Yes, and this is more common than you might think. When developers install a library, it often brings in other libraries that it needs to function. These are known as transitive dependencies, and they can introduce security risks even if your team never installed them directly. If one of these components is compromised, your developers need to trace which package introduced it, identify the affected versions, and apply the appropriate fix. Once that's done, they should verify that the rebuilt application and the version running in production are no longer using the compromised dependency.

  • Can a malicious package be dangerous without an associated CVE number?

    Absolutely. Not every malicious package receives a Common Vulnerabilities and Exposures (CVE) identifier, and attackers don't need one to cause damage, so please, DO NOT rely solely on CVE alerts. To reduce risk, we suggest ingesting and validating security advisories from package maintainers, checking which versions were affected, and looking for indicators of compromise, such as suspicious files, network connections, or domains.

  • What should we ask our software vendor after a security alert?

    Based on our experience, the first step should be to ask your software vendor whether the security issue affects your applications or any of the systems they rely on. If it does, ask what was affected, what they've done to fix it, and how they've confirmed the problem is resolved. We also recommend asking whether any security risks remain and what steps are being taken to address them so the issue is completely resolved.

  • Is updating a compromised library enough to resolve the incident?

    Not necessarily. Updating a compromised library doesn't automatically mean the security issue is resolved. If malicious code was already running before the update, attackers may have stolen credentials, accessed sensitive information, or made unauthorized changes to your systems. Our suggestion is that your security team investigates the incident further, validates that there aren’t any remaining security risks, and confirms that the affected systems are safe and won't re-introduce risk.