CVE-2023-38037: Medium severity rubygems/activesupport vulnerability
ActiveSupport::EncryptedFile writes contents that will be encrypted to a temporary file. The temporary file's permissions are defaulted to the user's current umask settings, meaning that it's possible for other users on the same system to read the contents of the temporary file. Attackers that have access to the file system could possibly read the contents of this temporary file while a user is editing it. All users running an affected release should either upgrade or use one of the workarounds immediately.
Other sources
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2023-38037.yml http://localhost:5600/static/#/asmticket/98986
CVE(s): CVE-2023-38037 There is a possible file disclosure of locally encrypted files in Active Support.
Versions Affected: >= 5.2.0 Not affected: < 5.2.0 Fixed Versions: 7.0.7.1, 6.1.7.5
Impact ActiveSupport::EncryptedFile writes contents that will be encrypted to a temporary file. The temporary file’s permissions are defaulted to the user’s current umask settings, meaning that it’s possible for other users on the same system to read the contents of the temporary file.
Attackers that have access to the file system could possibly read the contents of this temporary file while a user is editing it.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases The fixed releases are available at the normal locations.
Workarounds To work around this issue, you can set your umask to be more restrictive like this:
ruby $ umask 0077
— Red Hat
There is a possible file disclosure of locally encrypted files in Active Support. This vulnerability has been assigned the CVE identifier CVE-2023-38037.
Versions Affected: >= 5.2.0 Not affected: < 5.2.0 Fixed Versions: 7.0.7.1, 6.1.7.5
Impact ActiveSupport::EncryptedFile writes contents that will be encrypted to a temporary file. The temporary file’s permissions are defaulted to the user’s current umask settings, meaning that it’s possible for other users on the same system to read the contents of the temporary file.
Attackers that have access to the file system could possibly read the contents of this temporary file while a user is editing it.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases The fixed releases are available at the normal locations.
Workarounds To work around this issue, you can set your umask to be more restrictive like this:
ruby $ umask 0077
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/activesupportto a version that resolves this vulnerability.Fixed in 7.0.7.1 - Upgrade
Upgrade
rubygems/activesupportto a version that resolves this vulnerability.Fixed in 6.1.7.5 - Upgrade
Upgrade
redhat/activesupportto a version that resolves this vulnerability.Fixed in 7.0.7.1 - Upgrade
Upgrade
redhat/activesupportto a version that resolves this vulnerability.Fixed in 6.1.7.5 - Upgrade
Upgrade
debian/railsto a version that resolves this vulnerability.Fixed in 2:6.1.7.10+dfsg-1~deb12u2Fixed in 2:6.1.7.10+dfsg-1~deb12u3Fixed in 2:7.2.2.2+dfsg-2~deb13u1Fixed in 2:7.2.2.2+dfsg-2~deb13u2Fixed in 2:7.2.4+dfsg-2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.0.7.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.1.7.5 - Configuration
Set the umask to 0077 so temporary files containing encrypted contents are not readable by other users on the same system.
ActiveSupport::EncryptedFile umask = 0077
Event History
Frequently Asked Questions
What is the severity of CVE-2023-38037?
CVE-2023-38037 has been classified as a moderate severity vulnerability due to potential unauthorized access to sensitive data.
How do I fix CVE-2023-38037?
To mitigate CVE-2023-38037, update ActiveSupport to version 6.1.7.5 or 7.0.7.1.
What causes the vulnerability in CVE-2023-38037?
CVE-2023-38037 is caused by ActiveSupport::EncryptedFile writing to temporary files with permissions set by the user's umask.
Who is affected by CVE-2023-38037?
CVE-2023-38037 affects users of ActiveSupport versions between 5.2.0 and 7.0.7.1.
Can CVE-2023-38037 be exploited remotely?
CVE-2023-38037 requires local access to the system, making remote exploitation unlikely.