Skip to content

Commit 8b2fe62

Browse files
authored
fix(security): upgrade axios to 1.15.0 for GHSA-3p68-rc4w-qgx5 (#41739)
## Summary - Upgrade `axios` to `^1.15.0` in `app/client/package.json` and `app/client/packages/rts/package.json` to remediate GHSA-3p68-rc4w-qgx5 / CVE-2025-62718. - Regenerate `app/client/yarn.lock` so all client workspace consumers (including `wait-on`) resolve to `axios@1.15.0`. - Add RTS regression coverage in `app/client/packages/rts/src/__tests__/axiosNoProxyNormalization.test.ts` to verify loopback host variants are not proxied when `NO_PROXY` is set. ## Test plan - [x] `yarn install --mode=skip-build` (from `app/client`) - [x] `yarn why axios` shows `axios@1.15.0` for `appsmith`, `appsmith-rts`, and `wait-on` - [x] `yarn test:unit` (from `app/client/packages/rts`) - [x] `yarn lint` (from `app/client/packages/rts`) - [x] `yarn build` (from `app/client`) - [x] `npx prettier --write ./src ./cypress` (from `app/client`) - [ ] `npx eslint --fix -c ./cypress/.eslintrc.json --cache ./cypress` (from `app/client`) - command was run multiple times but hangs in this local environment without producing completion output. - [ ] `yarn g:jest src/api/__tests__/apiRequestInterceptors.test.ts src/api/__tests__/apiFailureResponseInterceptors.test.ts src/api/__tests__/apiSucessResponseInterceptors.test.ts` (from `app/client`) - fails in this environment due missing `canvas` binary (`Cannot find module '../build/Release/canvas.node'`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> Fixes https://linear.app/appsmith/issue/APP-15127/security-critical-dependabot-alert-580-axios-no-proxy-hostname ## Summary by CodeRabbit * **Chores** * Updated HTTP client library dependencies across packages to the latest compatible version for improved stability and performance. * **Tests** * Added test coverage for proxy configuration normalization behavior to ensure reliable network connectivity. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Automation /ok-to-test tags="@tag.All" <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/24443669428> > Commit: ce5b569 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=24443669428&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 15 Apr 2026 09:39:49 UTC <!-- end of auto-generated comment: Cypress test results -->
1 parent 7d8a5ef commit 8b2fe62

4 files changed

Lines changed: 74 additions & 20 deletions

File tree

app/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"assert-never": "^1.2.1",
122122
"astring": "^1.7.5",
123123
"async-mutex": "^0.5.0",
124-
"axios": "^1.12.0",
124+
"axios": "^1.15.0",
125125
"bfj": "^7.0.2",
126126
"camelcase": "^6.2.1",
127127
"classnames": "^2.3.1",
@@ -439,7 +439,7 @@
439439
"@blueprintjs/icons": "3.22.0",
440440
"@types/react": "^17.0.2",
441441
"postcss": "8.4.31",
442-
"axios": "^1.12.0",
442+
"axios": "^1.15.0",
443443
"esbuild": "^0.25.1",
444444
"path-to-regexp@^1.7.0": "1.9.0",
445445
"prismjs": "1.30.0",

app/client/packages/rts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@opentelemetry/sdk-trace-node": "^1.27.0",
2424
"@opentelemetry/semantic-conventions": "^1.27.0",
2525
"@shared/ast": "workspace:^",
26-
"axios": "^1.12.0",
26+
"axios": "^1.15.0",
2727
"dotenv": "10.0.0",
2828
"express": "^4.20.0",
2929
"express-validator": "^6.14.2",
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import axios from "axios";
2+
import http from "http";
3+
4+
describe("axios NO_PROXY normalization", () => {
5+
const originalHttpProxy = process.env.HTTP_PROXY;
6+
const originalNoProxy = process.env.NO_PROXY;
7+
8+
afterEach(() => {
9+
if (originalHttpProxy === undefined) {
10+
delete process.env.HTTP_PROXY;
11+
} else {
12+
process.env.HTTP_PROXY = originalHttpProxy;
13+
}
14+
15+
if (originalNoProxy === undefined) {
16+
delete process.env.NO_PROXY;
17+
} else {
18+
process.env.NO_PROXY = originalNoProxy;
19+
}
20+
});
21+
22+
it("does not proxy localhost variants when NO_PROXY includes loopback hosts", async () => {
23+
const proxiedRequests: string[] = [];
24+
const proxyServer = http.createServer((req, res) => {
25+
proxiedRequests.push(`${req.method} ${req.url ?? ""}`);
26+
res.statusCode = 200;
27+
res.end("proxied");
28+
});
29+
30+
await new Promise<void>((resolve) =>
31+
proxyServer.listen(0, "127.0.0.1", resolve),
32+
);
33+
const address = proxyServer.address();
34+
35+
if (!address || typeof address === "string") {
36+
proxyServer.close();
37+
throw new Error("Failed to bind proxy server");
38+
}
39+
40+
process.env.HTTP_PROXY = `http://127.0.0.1:${address.port}`;
41+
process.env.NO_PROXY = "localhost,127.0.0.1,::1";
42+
43+
await axios
44+
.get("http://localhost.:65534", { timeout: 300 })
45+
.catch(() => null);
46+
await axios.get("http://[::1]:65534", { timeout: 300 }).catch(() => null);
47+
48+
await new Promise<void>((resolve, reject) => {
49+
proxyServer.close((error) => (error ? reject(error) : resolve()));
50+
});
51+
52+
expect(proxiedRequests).toHaveLength(0);
53+
});
54+
});

app/client/yarn.lock

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13642,7 +13642,7 @@ __metadata:
1364213642
"@types/node": "*"
1364313643
"@types/nodemailer": ^6.4.17
1364413644
"@types/readline-sync": ^1.4.8
13645-
axios: ^1.12.0
13645+
axios: ^1.15.0
1364613646
dotenv: 10.0.0
1364713647
express: ^4.20.0
1364813648
express-validator: ^6.14.2
@@ -13788,7 +13788,7 @@ __metadata:
1378813788
assert-never: ^1.2.1
1378913789
astring: ^1.7.5
1379013790
async-mutex: ^0.5.0
13791-
axios: ^1.12.0
13791+
axios: ^1.15.0
1379213792
babel-jest: ^27.4.2
1379313793
babel-loader: ^8.2.3
1379413794
babel-plugin-lodash: ^3.3.4
@@ -14456,14 +14456,14 @@ __metadata:
1445614456
languageName: node
1445714457
linkType: hard
1445814458

14459-
"axios@npm:^1.12.0":
14460-
version: 1.12.2
14461-
resolution: "axios@npm:1.12.2"
14459+
"axios@npm:^1.15.0":
14460+
version: 1.15.0
14461+
resolution: "axios@npm:1.15.0"
1446214462
dependencies:
14463-
follow-redirects: ^1.15.6
14464-
form-data: ^4.0.4
14465-
proxy-from-env: ^1.1.0
14466-
checksum: f0331594fe053a4bbff04104edb073973a3aabfad2e56b0aa18de82428aa63f6f0839ca3d837258ec739cb4528014121793b1649a21e5115ffb2bf8237eadca3
14463+
follow-redirects: ^1.15.11
14464+
form-data: ^4.0.5
14465+
proxy-from-env: ^2.1.0
14466+
checksum: 95a8455554867a083ab3772fcadba42a22ec4bb546dccc66011556d837a07e544ae006675a30a5c43453f3e37e7c0982e934cec482c06b75abead2a2c157448a
1446714467
languageName: node
1446814468
linkType: hard
1446914469

@@ -20131,13 +20131,13 @@ __metadata:
2013120131
languageName: node
2013220132
linkType: hard
2013320133

20134-
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.6":
20135-
version: 1.15.6
20136-
resolution: "follow-redirects@npm:1.15.6"
20134+
"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.11":
20135+
version: 1.16.0
20136+
resolution: "follow-redirects@npm:1.16.0"
2013720137
peerDependenciesMeta:
2013820138
debug:
2013920139
optional: true
20140-
checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5
20140+
checksum: e90dce4607b1f6b8b9883287f912585573c19088209ad82341d550a795b4ba514522b73b1b340cf618279df27975cd46504d09149be60291ba6767384c1fd8f8
2014120141
languageName: node
2014220142
linkType: hard
2014320143

@@ -29073,10 +29073,10 @@ __metadata:
2907329073
languageName: node
2907429074
linkType: hard
2907529075

29076-
"proxy-from-env@npm:^1.1.0":
29077-
version: 1.1.0
29078-
resolution: "proxy-from-env@npm:1.1.0"
29079-
checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4
29076+
"proxy-from-env@npm:^2.1.0":
29077+
version: 2.1.0
29078+
resolution: "proxy-from-env@npm:2.1.0"
29079+
checksum: b106ad790f26d47ba4791af3fe8cba5c8d35d85020119c82c05b413eb11b3ab97d2393ecaed51bca97c2788fa256408283dfeb4d970b2ebcae6702310f064e7e
2908029080
languageName: node
2908129081
linkType: hard
2908229082

0 commit comments

Comments
 (0)