CVEfocus › CVE database › CVE-2022-21704

CVE-2022-21704Incorrect Default Permissions in log4js-node

CVSS 5.5 MediumEPSS 0.4% (higher than 24% of CVEs)Published 2022-01-19Updated 2025-04-23Assigner: GitHub_M

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.

CWE-276

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

4Fixed
4Fix pending
4Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04node-log4jsNot affected
vulnerable_code_not_present
Ubuntu 25.10node-log4jsNot affected
vulnerable_code_not_present
Ubuntu 24.04node-log4jsNot affected
vulnerable_code_not_present
Ubuntu 22.04node-log4jsNot affected
vulnerable_code_not_present
Ubuntu 20.04node-log4jsFix pendingUBUNTU-CVE-2022-21704
Ubuntu 18.04node-log4jsFix pendingUBUNTU-CVE-2022-21704
Ubuntu 16.04node-log4jsFix pendingUBUNTU-CVE-2022-21704
Ubuntu 14.04node-log4jsFix pending
Debian 14node-log4jsFixed6.4.1+~cs8.3.5-1DEBIAN-CVE-2022-21704
Debian 13node-log4jsFixed6.4.1+~cs8.3.5-1DEBIAN-CVE-2022-21704
Debian 12node-log4jsFixed6.4.1+~cs8.3.5-1DEBIAN-CVE-2022-21704
npm librarylog4jsFixed6.4.0GHSA-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.

References

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.