Skip to content

Commit db33fa7

Browse files
fix: update jimp to fix vulnerability (#1133)
1 parent b7374d6 commit db33fa7

7 files changed

Lines changed: 646 additions & 605 deletions

File tree

.changeset/modern-files-fly.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
"@wdio/image-comparison-core": patch
3+
"@wdio/ocr-service": patch
4+
"@wdio/visual-reporter": patch
5+
"@wdio/visual-service": patch
6+
---
7+
8+
#### `@wdio/image-comparison-core` and `@wdio/ocr-service` — Security: update jimp (CVE in `file-type` transitive dep)
9+
10+
Bumped `jimp` to the latest version to resolve a reported vulnerability in its `file-type` transitive dependency (see [#1130](https://github.com/webdriverio/visual-testing/issues/1130), raised by [@denis-sokolov](https://github.com/denis-sokolov), thank you!).
11+
12+
**Actual impact on these packages**
13+
`file-type` is used by `@jimp/core` solely to detect image MIME types when reading a buffer. In both `@wdio/image-comparison-core` and `@wdio/ocr-service`, every image passed to jimp originates from either WebDriver screenshots (browser-controlled base64 data) or local files written by the framework itself. There is no code path where untrusted external input is fed directly into jimp, which removes the exploitability that the CVE describes.
14+
15+
That said, the reputational and compliance risk was real, security scanners flag the package as vulnerable, enterprise users hit audit failures, and some organisations block installation of packages with known CVEs. The update addresses all of that.
16+
17+
#### `@wdio/visual-reporter` and `@wdio/visual-service`
18+
19+
Updated internal dependencies to pick up the jimp bump in `@wdio/image-comparison-core`.
20+
21+
22+
### Committers: 1
23+
24+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,26 @@
5959
"@types/jsdom": "~21.1.7",
6060
"@types/node": "^24",
6161
"@types/xml2js": "~0.4.14",
62-
"@typescript-eslint/eslint-plugin": "^8.57.0",
63-
"@wdio/globals": "^9.23.0",
64-
"@wdio/mocha-framework": "^9.25.0",
65-
"@typescript-eslint/parser": "^8.57.0",
66-
"@typescript-eslint/utils": "^8.57.0",
62+
"@typescript-eslint/eslint-plugin": "^8.58.1",
63+
"@wdio/globals": "^9.27.0",
64+
"@wdio/mocha-framework": "^9.27.0",
65+
"@typescript-eslint/parser": "^8.58.1",
66+
"@typescript-eslint/utils": "^8.58.1",
6767
"@vitest/coverage-v8": "^3.2.4",
6868
"@vitest/ui": "^3.2.4",
69-
"@wdio/appium-service": "^9.25.0",
70-
"@wdio/browserstack-service": "^9.25.0",
71-
"@wdio/cli": "^9.25.0",
72-
"@wdio/local-runner": "^9.25.0",
73-
"@wdio/sauce-service": "^9.25.0",
74-
"@wdio/shared-store-service": "^9.25.0",
75-
"@wdio/spec-reporter": "^9.25.0",
76-
"@wdio/types": "^9.25.0",
69+
"@wdio/appium-service": "^9.27.0",
70+
"@wdio/browserstack-service": "^9.27.0",
71+
"@wdio/cli": "^9.27.0",
72+
"@wdio/local-runner": "^9.27.0",
73+
"@wdio/sauce-service": "^9.27.0",
74+
"@wdio/shared-store-service": "^9.27.0",
75+
"@wdio/spec-reporter": "^9.27.0",
76+
"@wdio/types": "^9.27.0",
7777
"cross-env": "^7.0.3",
7878
"eslint": "^9.39.4",
7979
"eslint-plugin-import": "^2.32.0",
8080
"eslint-plugin-unicorn": "^56.0.1",
81-
"eslint-plugin-wdio": "^9.25.0",
81+
"eslint-plugin-wdio": "^9.27.0",
8282
"husky": "^9.1.7",
8383
"jsdom": "^26.1.0",
8484
"npm-run-all2": "^8.0.4",
@@ -88,7 +88,7 @@
8888
"ts-node": "^10.9.2",
8989
"typescript": "^5.9.3",
9090
"vitest": "^3.2.4",
91-
"webdriverio": "^9.25.0",
91+
"webdriverio": "^9.27.0",
9292
"wdio-lambdatest-service": "^4.0.1"
9393
},
9494
"packageManager": "[email protected]+sha256.cf86a7ad764406395d4286a6d09d730711720acc6d93e9dce9ac7ac4dc4a28a7"

packages/image-comparison-core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"watch:tsc": "pnpm run build:tsc -w"
3535
},
3636
"dependencies": {
37-
"jimp": "^1.6.0",
37+
"jimp": "^1.6.1",
3838
"@wdio/logger": "^9.18.0",
39-
"@wdio/types": "^9.25.0"
39+
"@wdio/types": "^9.27.0"
4040
},
4141
"devDependencies": {
42-
"webdriverio": "^9.25.0"
42+
"webdriverio": "^9.27.0"
4343
},
4444
"publishConfig": {
4545
"access": "public"

packages/ocr-service/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"watch": "pnpm run build:tsc -w"
2929
},
3030
"dependencies": {
31-
"@wdio/globals": "^9.23.0",
31+
"@wdio/globals": "^9.27.0",
3232
"@wdio/logger": "^9.18.0",
33-
"@wdio/types": "^9.25.0",
34-
"fuse.js": "^7.1.0",
33+
"@wdio/types": "^9.27.0",
34+
"fuse.js": "^7.3.0",
3535
"@inquirer/prompts": "7.10.1",
36-
"jimp": "^1.6.0",
36+
"jimp": "^1.6.1",
3737
"node-tesseract-ocr": "^2.2.1",
3838
"tesseract.js": "^5.1.1",
3939
"xml2js": "^0.6.2"

packages/visual-reporter/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@
4141
"@remix-run/dev": "^2.17.4",
4242
"@types/react": "^18.3.28",
4343
"@types/react-dom": "^18.3.7",
44-
"@typescript-eslint/eslint-plugin": "^8.57.0",
45-
"@typescript-eslint/parser": "^8.57.0",
44+
"@typescript-eslint/eslint-plugin": "^8.58.1",
45+
"@typescript-eslint/parser": "^8.58.1",
4646
"autoprefixer": "^10.4.27",
4747
"eslint": "^9.39.4",
4848
"eslint-import-resolver-typescript": "^3.10.1",
4949
"eslint-plugin-import": "^2.32.0",
5050
"eslint-plugin-jsx-a11y": "^6.10.2",
5151
"eslint-plugin-react": "^7.37.5",
5252
"eslint-plugin-react-hooks": "^5.2.0",
53-
"isbot": "^5.1.36",
54-
"postcss": "^8.5.8",
53+
"isbot": "^5.1.37",
54+
"postcss": "^8.5.9",
5555
"react": "^18.3.1",
5656
"react-dom": "^18.3.1",
5757
"react-icons": "^5.6.0",

packages/visual-service/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"watch": "pnpm run build:tsc -w"
2727
},
2828
"dependencies": {
29-
"@wdio/globals": "^9.23.0",
29+
"@wdio/globals": "^9.27.0",
3030
"@wdio/logger": "^9.18.0",
31-
"@wdio/types": "^9.25.0",
32-
"expect-webdriverio": "^5.6.4",
31+
"@wdio/types": "^9.27.0",
32+
"expect-webdriverio": "^5.6.5",
3333
"@wdio/image-comparison-core": "workspace:*"
3434
}
3535
}

0 commit comments

Comments
 (0)