CVE-2022-21704 Incorrect Default Permissions in log4js-node
Attackers can read sensitive log files because default permissions are world-readable, affecting users who did not explicitly set file modes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-21704?
CVE-2022-21704 is a medium-severity vulnerability in Debian Debian Linux, published on 19 Jan 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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.
Weakness: CWE-276
Which versions are affected by CVE-2022-21704?
2 open source packages ship an affected version, including log4js. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
log4js npm | All versions | 6.4.0 |
log4js npm | All versions | 6.4.0 |
Products include Debian Debian Linux, Log4js Project Log4js.
How do I fix CVE-2022-21704?
Upgrade log4js to 6.4.0 or later.
Is CVE-2022-21704 being exploited?
There is no known exploitation of CVE-2022-21704 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-45261, CLSA-2026-1772583203, CLSA-2026-1788553383, CLSA-2026-1792473187, DEBIAN-CVE-2022-21704, DLA-3229-1 and 2 more.