CVE-2022-21704Incorrect Default Permissions in log4js-node
log4js-node is a port of log4js to node.js. In affected versions default file permissions for log files created by the file, fileSync and dateFile appenders are world-readable (in unix). This could cause problems if log files contain sensitive information. This would affect any users that have not supplied their own permissions for the files via the mode parameter in the config. Users are advised to update.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | node-log4js | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | node-log4js | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | node-log4js | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | node-log4js | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | node-log4js | Fix pending | UBUNTU-CVE-2022-21704 | |
| Ubuntu 18.04 | node-log4js | Fix pending | UBUNTU-CVE-2022-21704 | |
| Ubuntu 16.04 | node-log4js | Fix pending | UBUNTU-CVE-2022-21704 | |
| Ubuntu 14.04 | node-log4js | Fix pending | ||
| Debian 14 | node-log4js | Fixed | 6.4.1+~cs8.3.5-1 | DEBIAN-CVE-2022-21704 |
| Debian 13 | node-log4js | Fixed | 6.4.1+~cs8.3.5-1 | DEBIAN-CVE-2022-21704 |
| Debian 12 | node-log4js | Fixed | 6.4.1+~cs8.3.5-1 | DEBIAN-CVE-2022-21704 |
| npm library | log4js | Fixed | 6.4.0 | GHSA-82v2-mx6x-wq7q |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- log4js-node: affected: < 6.4.0
References
- https://github.com/log4js-node/log4js-node/security/advisories/GHSA-82v2-mx6x-wq7q
- https://github.com/log4js-node/log4js-node/pull/1141/commits/8042252861a1b65adb66931fdf702ead34fa9b76
- https://github.com/log4js-node/streamroller/pull/87
- https://github.com/log4js-node/log4js-node/blob/v6.4.0/CHANGELOG.md#640
- https://lists.debian.org/debian-lts-announce/2022/12/msg00014.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.