How to fix vulnerable component axios on Adobe Commerce (Magento)

Update the Axios JavaScript library to its latest stable release to eliminate known security vulnerabilities in your storefront code.

Steps for Adobe Commerce (Magento)

  1. On your server, navigate to your Magento root directory and run `npm list axios` (or `yarn list axios`) in any frontend theme or module that uses npm to confirm the installed version.
  2. Open the relevant package.json file (typically in app/design/frontend/Vendor/theme/ or a custom module's view/frontend/ directory) and update the axios version constraint to `^latest` or the specific latest version number.
  3. Run `npm install` (or `yarn`) followed by your frontend build command (e.g. `npm run build` or `grunt less` depending on your setup) to compile the updated bundle.
  4. If Axios is loaded via a CDN <script> tag in a layout XML file (.xml) or a PHTML template, locate the file under app/design/frontend/ or app/code/Vendor/Module/view/frontend/templates/, update the URL, then run `php bin/magento cache:flush`.
  5. Deploy the updated static content with `php bin/magento setup:static-content:deploy` and verify the new version loads in your browser's DevTools.
Official Adobe Commerce (Magento) documentation ↗

What is vulnerable component axios?

Axios is a popular JavaScript library used by many ecommerce themes, apps, and custom storefronts to make HTTP requests — for example, fetching product data, submitting forms, or calling third-party APIs. Like any software, Axios receives security patches over time. When a site runs an old version of Axios, it means known security flaws (called CVEs — Common Vulnerabilities and Exposures) remain active on that site. These vulnerabilities are publicly documented, so attackers know exactly which versions are affected and how to exploit them. Updating to the latest version closes those known holes.

Running a vulnerable version of Axios exposes your store to real, documented attack vectors. For example, CVE-2023-45857 allows an attacker to steal confidential XSRF tokens by sending requests to a malicious third-party server — which could lead to cross-site request forgery attacks that perform unauthorized actions on behalf of your customers or your admin account. CVE-2025-27152 and CVE-2025-58754 introduce further credential-leakage and request-smuggling risks. A single exploited vulnerability can result in customer data theft, fraudulent orders, loss of payment-processor compliance (PCI-DSS), and significant brand damage. Google and other search engines also demote or warn about sites flagged as dangerous, which directly reduces organic traffic and conversions. Because the affected versions and their exploits are publicly listed in the National Vulnerability Database, your site is a known target — not a theoretical one.

See the complete Vulnerable component axios guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ scan — we’ll find vulnerable component axios and every other issue across your whole site.

Scan my site free

Fix vulnerable component axios on another platform