CVE-2023-38037: Medium severity rubygems/activesupport vulnerability

Published Aug 23, 2023
·
Updated

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

5 affected componentsFixes available
rubygems/activesupport>=7.0.0<7.0.7.1
7.0.7.1
rubygems/activesupport>=5.2.0<6.1.7.5
6.1.7.5
redhat/activesupport<7.0.7.1
7.0.7.1
redhat/activesupport<6.1.7.5
6.1.7.5
debian/rails
2:6.1.7.10+dfsg-1~deb12u22:6.1.7.10+dfsg-1~deb12u32:7.2.2.2+dfsg-2~deb13u12:7.2.2.2+dfsg-2~deb13u22:7.2.4+dfsg-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/activesupport to a version that resolves this vulnerability.

    Fixed in 7.0.7.1
  2. Upgrade

    Upgrade rubygems/activesupport to a version that resolves this vulnerability.

    Fixed in 6.1.7.5
  3. Upgrade

    Upgrade redhat/activesupport to a version that resolves this vulnerability.

    Fixed in 7.0.7.1
  4. Upgrade

    Upgrade redhat/activesupport to a version that resolves this vulnerability.

    Fixed in 6.1.7.5
  5. Upgrade

    Upgrade debian/rails to 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
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.0.7.1
  7. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.1.7.5
  8. 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

Aug 23, 2023
Advisory Published
via GitHub·08:36 PM
Data Sourced
via GitHub·08:36 PM
DescriptionSeverityWeaknessAffected Software
Aug 30, 2023
Data Sourced
via Red Hat·08:16 PM
DescriptionSeverityAffected Software
Jan 9, 2025
CVE Published
via MITRE·12:33 AM
Data Sourced
via MITRE·12:33 AM
DescriptionSeverity
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

Who is affected by CVE-2023-38037?

CVE-2023-38037 affects users of ActiveSupport versions between 5.2.0 and 7.0.7.1.

5

Can CVE-2023-38037 be exploited remotely?

CVE-2023-38037 requires local access to the system, making remote exploitation unlikely.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203