Skip to content

[Security] Bump nesbot/carbon from 3.8.2 to 3.8.5

Dependabot requested to merge dependabot-composer-nesbot-carbon-3.8.5 into main

Bumps nesbot/carbon from 3.8.2 to 3.8.5. This update includes a security fix.

Vulnerabilities fixed

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:

  • Validate input before calling setLocale(), for instance by forbidding or removing / and \
  • Call setLocale() only with a locale from a whitelist of supported locales
  • When uploading files, rename them so they cannot have a .php extension (this is recommended even if you're not affected by this issue)
  • Prefer storage system that are not local to the application (remote service, or local service ran by another user so the uploaded files actually live outside of the application basedir)

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

Patched versions: 2.72.6; 3.8.4 Affected versions: = 3.0.0, < 3.8.4

Release notes

Sourced from nesbot/carbon's releases.

3.8.5

Complete commits list: https://github.com/briannesbitt/Carbon/compare/3.8.4...3.8.5

Summary:

New Contributors

3.8.4

Complete commits list: https://github.com/CarbonPHP/carbon/compare/3.8.3...3.8.4

Summary:

  • Validate locale earlier
Commits
  • b1a53a2 Merge branch 'master' of github.com:CarbonPHP/carbon
  • 450a747 Merge pull request #3144 from novruzrhmv/issues-3143
  • 2ac02b5 fix tests
  • d4ad3cd fix: update hour abbreviation translation
  • 964001c fix: correct time unit abbreviations and format mismatches for Azerbaijani tr...
  • 8359bf8 Merge pull request #19 from CarbonPHP/job/update-sponsors
  • a95c8e7 Merge pull request #3141 from briannesbitt/job/update-sponsors
  • 6b1ed0a Update sponsors
  • 59e5ff7 Update sponsors
  • d96663c Merge pull request #17 from CarbonPHP/job/update-sponsors
  • Additional commits viewable in compare view

Merge request reports

Loading