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 package | Versions | Reported by |
|---|---|---|
| Rails ActiveSupport | from >= 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.1 | GitHub Advisory Database |
All scores
| hackerone | 5.5medium CVSS:3.0 | CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L |
| GitHub | 5.5medium CVSS:3.0 | CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:L/A:L |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-38037 changed 2025-02-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cr5q-6q9f-rq6q changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-38037 changed 2026-06-17 | Public domain |