CVE-2023-3972: Creation of Temporary File in Directory with Insecure Permissions in Red Hat Red Hat Enterprise Linux 7
A vulnerability was found in insights-client. This security issue occurs because of insecure file operations or unsafe handling of temporary files and directories that lead to local privilege escalation. Before the insights-client has been registered on the system by root, an unprivileged local user or attacker could create the /var/tmp/insights-client directory (owning the directory with read, write, and execute permissions) on the system. After the insights-client is registered by root, an attacker could then control the directory content that insights are using by putting malicious scripts into it and executing arbitrary code as root (trivially bypassing SELinux protections because insights processes are allowed to disable SELinux system-wide).
AI Analysis
Technical Summary
CVE-2023-3972 is a vulnerability in the insights-client component of Red Hat Enterprise Linux 7, involving insecure creation and handling of temporary files and directories. Specifically, before the insights-client is registered by root, an unprivileged local user can create the /var/tmp/insights-client directory with full control (read, write, execute). When root subsequently registers the insights-client, the process uses this directory, allowing the attacker to place malicious scripts or files that the insights-client executes with root privileges. This leads to local privilege escalation. The vulnerability is exacerbated by the fact that insights-client processes are permitted to disable SELinux protections system-wide, making it trivial to bypass mandatory access controls. The CVSS v3.1 score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and requiring only low privileges and no user interaction. Although no public exploits are currently known, the vulnerability poses a significant risk in environments where multiple users have local access. The root cause is improper permissions and unsafe temporary file handling, categorized under CWE-379 (Creation of Temporary File in Directory with Insecure Permissions).
Potential Impact
For European organizations, this vulnerability can lead to full system compromise by a local attacker, resulting in unauthorized access to sensitive data, disruption of services, and potential lateral movement within networks. Organizations relying on Red Hat Enterprise Linux 7, especially in multi-user or shared environments such as universities, research institutions, and enterprises with multiple local users, face increased risk. The ability to bypass SELinux protections further amplifies the threat, undermining a critical security layer commonly used in European data centers and government systems. Critical infrastructure operators and enterprises handling sensitive or regulated data could suffer severe consequences including data breaches, operational downtime, and compliance violations under GDPR and other regulations. The lack of known exploits in the wild currently reduces immediate risk but does not diminish the urgency for remediation.
Mitigation Recommendations
1. Immediately restrict local user permissions to prevent unprivileged users from creating or modifying the /var/tmp/insights-client directory before the insights-client is registered by root. 2. Implement strict filesystem permissions and ownership checks on /var/tmp and related temporary directories to prevent unauthorized directory creation. 3. Monitor and audit file system changes in /var/tmp for suspicious activity, especially creation of directories or files related to insights-client. 4. Apply any available patches or updates from Red Hat as soon as they are released to address this vulnerability. 5. Consider disabling or limiting the use of insights-client if it is not essential, or isolate systems where it is used to reduce exposure. 6. Employ mandatory access control policies and enhanced monitoring to detect attempts to exploit this vulnerability. 7. Educate system administrators about the risks of insecure temporary file handling and the importance of secure directory permissions. 8. Use tools to verify SELinux status and ensure it is properly enforced except where explicitly required to be disabled by trusted processes.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Poland, Sweden, Belgium, Finland
CVE-2023-3972: Creation of Temporary File in Directory with Insecure Permissions in Red Hat Red Hat Enterprise Linux 7
Description
A vulnerability was found in insights-client. This security issue occurs because of insecure file operations or unsafe handling of temporary files and directories that lead to local privilege escalation. Before the insights-client has been registered on the system by root, an unprivileged local user or attacker could create the /var/tmp/insights-client directory (owning the directory with read, write, and execute permissions) on the system. After the insights-client is registered by root, an attacker could then control the directory content that insights are using by putting malicious scripts into it and executing arbitrary code as root (trivially bypassing SELinux protections because insights processes are allowed to disable SELinux system-wide).
AI-Powered Analysis
Technical Analysis
CVE-2023-3972 is a vulnerability in the insights-client component of Red Hat Enterprise Linux 7, involving insecure creation and handling of temporary files and directories. Specifically, before the insights-client is registered by root, an unprivileged local user can create the /var/tmp/insights-client directory with full control (read, write, execute). When root subsequently registers the insights-client, the process uses this directory, allowing the attacker to place malicious scripts or files that the insights-client executes with root privileges. This leads to local privilege escalation. The vulnerability is exacerbated by the fact that insights-client processes are permitted to disable SELinux protections system-wide, making it trivial to bypass mandatory access controls. The CVSS v3.1 score is 7.8, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and requiring only low privileges and no user interaction. Although no public exploits are currently known, the vulnerability poses a significant risk in environments where multiple users have local access. The root cause is improper permissions and unsafe temporary file handling, categorized under CWE-379 (Creation of Temporary File in Directory with Insecure Permissions).
Potential Impact
For European organizations, this vulnerability can lead to full system compromise by a local attacker, resulting in unauthorized access to sensitive data, disruption of services, and potential lateral movement within networks. Organizations relying on Red Hat Enterprise Linux 7, especially in multi-user or shared environments such as universities, research institutions, and enterprises with multiple local users, face increased risk. The ability to bypass SELinux protections further amplifies the threat, undermining a critical security layer commonly used in European data centers and government systems. Critical infrastructure operators and enterprises handling sensitive or regulated data could suffer severe consequences including data breaches, operational downtime, and compliance violations under GDPR and other regulations. The lack of known exploits in the wild currently reduces immediate risk but does not diminish the urgency for remediation.
Mitigation Recommendations
1. Immediately restrict local user permissions to prevent unprivileged users from creating or modifying the /var/tmp/insights-client directory before the insights-client is registered by root. 2. Implement strict filesystem permissions and ownership checks on /var/tmp and related temporary directories to prevent unauthorized directory creation. 3. Monitor and audit file system changes in /var/tmp for suspicious activity, especially creation of directories or files related to insights-client. 4. Apply any available patches or updates from Red Hat as soon as they are released to address this vulnerability. 5. Consider disabling or limiting the use of insights-client if it is not essential, or isolate systems where it is used to reduce exposure. 6. Employ mandatory access control policies and enhanced monitoring to detect attempts to exploit this vulnerability. 7. Educate system administrators about the risks of insecure temporary file handling and the importance of secure directory permissions. 8. Use tools to verify SELinux status and ensure it is properly enforced except where explicitly required to be disabled by trusted processes.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- redhat
- Date Reserved
- 2023-07-27T12:10:37.684Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 68e0f3c1b66c7f7acdd3e95c
Added to database: 10/4/2025, 10:15:29 AM
Last enriched: 11/20/2025, 7:50:42 AM
Last updated: 11/28/2025, 10:41:02 AM
Views: 17
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-13771: CWE-23 Relative Path Traversal in Uniong WebITR
HighCVE-2025-13768: CWE-639 Authorization Bypass Through User-Controlled Key in Uniong WebITR
HighCVE-2025-13770: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Uniong WebITR
HighCVE-2025-13769: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Uniong WebITR
HighCVE-2025-66386: n/a
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.