{"id":"CVE-2022-21704","aliases":["CVE-2022-21704","GHSA-82v2-mx6x-wq7q"],"related":[],"kind":"vulnerability","state":"published","title":"Incorrect Default Permissions in log4js-node","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nDefault 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.\n\n### Patches\nFixed by:\n* https://github.com/log4js-node/log4js-node/pull/1141\n* https://github.com/log4js-node/streamroller/pull/87\n\nReleased to NPM in log4js@6.4.0\n\n### Workarounds\nEvery version of log4js published allows passing the mode parameter to the configuration of file appenders, see the documentation for details.\n\n### References\n\nThanks to [ranjit-git](https://www.huntr.dev/users/ranjit-git) for raising the issue, and to @lamweili for fixing the problem.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [logj4s-node](https://github.com/log4js-node/log4js-node)\n* Ask a question in the [slack channel](https://join.slack.com/t/log4js-node/shared_invite/enQtODkzMDQ3MzExMDczLWUzZmY0MmI0YWI1ZjFhODY0YjI0YmU1N2U5ZTRkOTYyYzg3MjY5NWI4M2FjZThjYjdiOGM0NjU2NzBmYTJjOGI)\n* Email us at [gareth.nomiddlename@gmail.com](mailto:gareth.nomiddlename@gmail.com)","format":"markdown","source":"ghsa"},{"lang":"es","text":"log4js-node es un port de log4js a node.js. En las versiones afectadas, los permisos de archivo por defecto para los archivos de registro creados por los anexos file, fileSync y dateFile son world-readable (en unix). Esto podría causar problemas si los archivos de registro contienen información confidencial. Esto afectaría a cualquier usuario que no haya proporcionado sus propios permisos para los archivos por medio del parámetro mode en la configuración. Se aconseja a usuarios a actualizar","source":"nvd"}],"published":"2022-01-19T00:00:00.000Z","modified":"2026-06-17T04:26:48.187Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:P/I:N/A:N","score":2.1,"rating":"LOW"}],"cwes":["CWE-276"],"affected":[{"ranges":[{"version":"< 6.4.0","status":"affected"}],"vendor":"log4js-node","product":"log4js-node","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.4.0"}],"ecosystem":"npm","package":"log4js","purl":"pkg:npm/log4js","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.4.0"}],"vendor":"log4js_project","product":"log4js","cpe":"cpe:2.3:a:log4js_project:log4js:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/log4js-node/log4js-node/security/advisories/GHSA-82v2-mx6x-wq7q","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/log4js-node/log4js-node/pull/1141/commits/8042252861a1b65adb66931fdf702ead34fa9b76","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/log4js-node/streamroller/pull/87","tags":["issue-tracking","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/log4js-node/log4js-node/blob/v6.4.0/CHANGELOG.md#640","tags":["release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/12/msg00014.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21704","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/log4js-node/log4js-node","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T14:11:49.538Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-21704","url":"https://www.cve.org/CVERecord?id=CVE-2022-21704","licence":"CVE Terms of Use","modified":"2025-04-23T19:10:12.838Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-82v2-mx6x-wq7q","url":"https://github.com/advisories/GHSA-82v2-mx6x-wq7q","licence":"CC-BY-4.0","modified":"2023-11-08T04:08:08.863Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-21704","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21704","licence":"Public domain","modified":"2026-06-17T04:26:48.187Z"}],"updatedAt":"2026-11-25T22:58:09.377Z","epss":{"score":0.00307,"percentile":0.25368,"date":"2026-12-01T12:00:22.000Z"}}