Skip to content

[BUG] Vulnerabilities in dependencies of exceljs package #2829

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
azharameen opened this issue Oct 1, 2024 · 4 comments
Open

[BUG] Vulnerabilities in dependencies of exceljs package #2829

azharameen opened this issue Oct 1, 2024 · 4 comments

Comments

@azharameen
Copy link

πŸ› Bug Report

Lib version: 4.4.0

Steps To Reproduce

Node.js Package: lodash ≀ 4.17.15 - Remote Prototype Pollution Vulnerability - 4.17.16

  • lodash.defaults 4.2.0
  • lodash.isequal 4.5.0
  • lodash.isplainobject 4.0.6
  • lodash.flatten 4.4.0
  • lodash.isboolean 3.0.3
@rbonestell
Copy link

There is also a downstream dependency vulnerability for inflight through the following dependencies of exceljs:

  1. exceljs@4.4.0 β€Ί archiver@5.3.2 β€Ί archiver-utils@2.1.0 β€Ί glob@7.2.3 β€Ί inflight@1.0.6
  2. exceljs@4.4.0 β€Ί tmp@0.2.1 β€Ί rimraf@3.0.2 β€Ί glob@7.2.3 β€Ί inflight@1.0.6
  3. exceljs@4.4.0 β€Ί archiver@5.3.2 β€Ί zip-stream@4.1.1 β€Ί archiver-utils@3.0.4 β€Ί glob@7.2.3 β€Ί inflight@1.0.6
  4. exceljs@4.4.0 β€Ί unzipper@0.10.14 β€Ί fstream@1.0.12 β€Ί rimraf@2.7.1 β€Ί glob@7.2.3 β€Ί inflight@1.0.6

Reference: https://security.snyk.io/vuln/SNYK-JS-INFLIGHT-6095116

@henryfung3a27
Copy link

I found a fix. For yarn users, add resolutions block to the root of your package.json.

{
  "name": "...",
  "resolutions": {
    "exceljs/**/archiver": "^7.0.1",
    "exceljs/**/unzipper": "^0.12.3"
  },
  "dependencies": {
    "exceljs": "^4.4.0"
  }
}

After running yarn install, verify the inflight package is no longer a dependency by running yarn list --pattern inflight.

For npm users, you may use overrides.

{
  "name": "...",
  "dependencies": {
    "exceljs": "^4.4.0"
  },
  "overrides": {
    "exceljs": {
      "archiver": "^7.0.1",
      "unzipper": "^0.12.3"
    }
  }
}

I tested it in my project and no issues were raised nor any content changes in the generated excel files after the upgrade.

@wilomgfx
Copy link

I found a fix. For yarn users, add resolutions block to the root of your package.json.

{
  "name": "...",
  "resolutions": {
    "exceljs/**/archiver": "^7.0.1",
    "exceljs/**/unzipper": "^0.12.3"
  },
  "dependencies": {
    "exceljs": "^4.4.0"
  }
}

After running yarn install, verify the inflight package is no longer a dependency by running yarn list --pattern inflight.

For npm users, you may use overrides.

{
  "name": "...",
  "dependencies": {
    "exceljs": "^4.4.0"
  },
  "overrides": {
    "exceljs": {
      "archiver": "^7.0.1",
      "unzipper": "^0.12.3"
    }
  }
}

I tested it in my project and no issues were raised nor any content changes in the generated excel files after the upgrade.

This is the solution we went with in our project using pnpm as well.

@tudor33sud
Copy link

any update on this issue? in the meantime, I'm also using @henryfung3a27 solution as a workaround. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants