Temporary File Information Disclosure vulnerability in MPXJ
GHSA-jf2p-4gqj-849g · CVE-2022-41954 · PYSEC-2022-42996
Published · Modified
AI SAST
Find this class of vulnerability in your own code
Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.
Description
Impact
On Unix-like operating systems (not Windows or macos), MPXJ's use of File.createTempFile(..) results in temporary files being created with the permissions -rw-r--r--. This means that any other user on the system can read the contents of this file. When MPXJ is reading a type of schedule file which requires the creation of a temporary file or directory, a knowledgeable local user could locate these transient files while they are in use and would then be able to read the schedule being processed by MPXJ.
Patches
The problem has been patched, MPXJ version 10.14.1 and later includes the necessary changes.
Workarounds
Setting java.io.tmpdir to a directory to which only the user running the application has access will prevent other users from accessing these temporary files.
For more information
If you have any questions or comments about this advisory
- Open an issue in https://github.com/joniles/mpxj
References
- WEB https://github.com/joniles/mpxj/security/advisories/GHSA-jf2p-4gqj-849g
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2022-41954
- WEB https://github.com/joniles/mpxj/commit/287ad0234213c52b0638565e14bd9cf3ed44cedd
- WEB https://github.com/joniles/mpxj/commit/ae0af24345d79ad45705265d9927fe55e94a5721
- PACKAGE https://github.com/joniles/mpxj
- WEB https://github.com/pypa/advisory-database/tree/main/vulns/mpxj/PYSEC-2022-42996.yaml
Ready to move
Start Securing
Free, no credit card | First findings in minutes