CVE-2023-38037
JSON

5.5medium

Active Support Possibly Discloses Locally Encrypted Files

Severity
5.5medium CVSS:3.0 by hackerone
Exploit likelihood
0.27% (higher than 21% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
GHSA-cr5q-6q9f-rq6q

Description

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.

Affected

Product or packageVersionsReported by
Rails ActiveSupportfrom >= 5.2.0 before >= 5.2.0
Not affected: from 5.2.0 before 5.2.0, from 7.0.7.1, 6.1.7.5 before 7.0.7.1, 6.1.7.5
CVE List
activesupport (RubyGems)from 5.2.0 before 6.1.7.5, from 7.0.0 before 7.0.7.1GitHub Advisory Database

All scores

hackerone5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L
GitHub5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L

Classification

CWE-377CWE-732

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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:

$ umask 0077
NVD (es)

ActiveSupport::EncryptedFile escribe el contenido que se cifrará en un archivo temporal. Los permisos del archivo temporal se establecen de forma predeterminada en la configuración actual de `umask` del usuario, lo que significa que otros usuarios del mismo sistema pueden leer el contenido del archivo temporal. Los atacantes que tengan acceso al sistema de archivos podrían leer el contenido de este archivo temporal mientras un usuario lo está editando. Todos los usuarios que ejecuten una versión afectada deberían actualizar o utilizar un workarounds de inmediato.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-38037 changed 2025-02-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-cr5q-6q9f-rq6q changed 2026-09-10CC-BY-4.0
NVDCVE-2023-38037 changed 2026-06-17Public domain