Skip to main content

Unchecked Return Value

CVE-2026-86749

Severity High
Score 7/10

Summary

Snipe-IT versions through 8.6.3 do not check the return value of storage write operations in "ImageUploadRequest::handleImages()". Because Laravel's default disk mode does not throw on failure, a silently failed "Storage::disk('public')->put(...)" call still caused the application to delete the previous image via "deleteExistingImage()" and to reassign and persist the model's image reference to the new filename, destroying the existing image and leaving the database row pointing at a file that was never written. A mirror problem existed in "deleteExistingImage()", where a failed "Storage::delete()" still nulled the model's image field, orphaning the file on disk. The condition is not directly attacker-controlled: it is triggered when any legitimate authenticated user submits an image upload while the storage backend transiently fails (for example an S3 network error, a local filesystem permission problem, or quota exhaustion). The result is unrecoverable loss of the prior image and a durable inconsistency between the database and disk that requires manual reconciliation. All models whose controllers route through "ImageUploadRequest::handleImages" (assets, asset models, users, companies, manufacturers, locations, categories, suppliers, departments, and other image-carrying models) are affected.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • REQUIRED
  • LOW
  • NONE
  • LOW

CWE-252 - Unchecked Return Value

The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

Advisory Timeline

  • Published