nesbot/carbon
Affected
- introduced
3.0.0, fixed3.8.4(ecosystem)
Fixed versions
3.8.4
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2025-22145
Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale
Impact
Application passing unsanitized user input to Carbon::setLocale are at risk of arbitrary file include, if the application allows users to upload files with .php extension in an folder that allows include or require to read it, then they are at risk of arbitrary code ran on their servers.
Patches
Workarounds
Any of the below actions can be taken to prevent the issue:
setLocale(), for instance by forbidding or removing / and \setLocale() only with a locale from a whitelist of supported locales.php extension (this is recommended even if you're not affected by this issue)References
https://en.wikipedia.org/wiki/File_inclusion_vulnerability
Credits
Thanks to Szczepan Hołyszewski who reported the issue and to Tidelift to coordinate the resolution
Medium Basis: The source's own band: MODERATE
3.0.0, fixed 3.8.4 (ecosystem)3.8.4
The export has no generic command for this ecosystem.
0, fixed 2.72.6 (ecosystem)2.72.6
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0