Skip to content

deps: update axios to 1.8.2 to fix SSRF vulnerability - #3

Merged
patrickwang1990 merged 2 commits into
mainfrom
semgrep-autofix/1779145168
Jun 8, 2026
Merged

deps: update axios to 1.8.2 to fix SSRF vulnerability#3
patrickwang1990 merged 2 commits into
mainfrom
semgrep-autofix/1779145168

Conversation

@semgrep-code-octanelending

Copy link
Copy Markdown

Update axios from 1.5.1 to 1.8.2 to address a Server-Side Request Forgery (SSRF) vulnerability.

Changes

  • Updated axios version from 1.5.1 to 1.8.2 in package.json
  • Updated axios entries in package-lock.json with new version, registry URL, and integrity hash

Why

Axios versions prior to 1.8.2 do not normalize hostnames before applying NO_PROXY rules. This allows requests to loopback addresses like localhost. or [::1] to be routed through a configured proxy instead of bypassing it. An attacker who can influence request URLs could exploit this to force internal traffic through a malicious proxy, potentially exposing sensitive responses. Version 1.8.2 fixes this hostname normalization issue.

Semgrep Finding Details

Affected versions of axios are vulnerable to Server-Side Request Forgery (SSRF) / Unintended Proxy or Intermediary ('Confused Deputy'). Axios does not normalize hostnames before applying NO_PROXY, so requests to loopback or internal hosts such as localhost. or [::1] can be sent through a configured proxy instead of bypassing it. If an attacker can influence request URLs, they may force local/internal Axios traffic through an attacker-controlled proxy, undermining SSRF protections and exposing sensitive responses.

Semgrep generated this Autofix PR for this finding from the detection rule ssc-5ea2c631-7cef-a4e0-e641-d179af079827.


⚠️ Review carefully before merging. This PR was generated by AI and may cause breaking changes or introduce new vulnerabilities.

@patrickwang1990
patrickwang1990 marked this pull request as ready for review June 8, 2026 16:48
Comment thread package-lock.json

@patrickwang1990 patrickwang1990 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Regenerated package-lock.json via public npm registry to match CI convention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patrickwang1990
patrickwang1990 force-pushed the semgrep-autofix/1779145168 branch from f08ac5e to 643ae32 Compare June 8, 2026 17:51
Semgrep flagged a vulnerability requiring axios >= 1.16.0.
Upgrading from 1.8.2 to 1.17.0 (latest) to fully resolve the finding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patrickwang1990
patrickwang1990 merged commit 7d34294 into main Jun 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant