You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SECURITY][FLEET UPLOADS] Verify file signatures and reject image bombs #190
Vehicle uploads trust the caller-provided Content-Type and do not run the KYC file signature checks. A file labeled as an image can contain another format or pathological dimensions.
Repository evidence
app/api/upload/route.ts:71-85 checks the MIME header and byte length for both scopes.
Only the KYC branch calls validateKycFile at app/api/upload/route.ts:89-105; the vehicle branch writes bytes directly at :180-185.
Scope
Decode and validate approved image formats by magic bytes and bounded dimensions/pixels.
Normalize images or reject malformed, polyglot, truncated, and decompression-bomb inputs.
Acceptance criteria
Header-only MIME spoofing cannot pass.
Validation limits are shared, documented, and enforced before storage.
Tests
Use mismatched headers, polyglots, oversized dimensions, truncated files, and valid JPEG/PNG/WebP fixtures.
I have experience with JavaScript/TypeScript and file-upload security. I’ll validate vehicle images by magic bytes and bounded dimensions, reject malformed and decompression-bomb files before storage, and add tests for spoofed, polyglot, truncated, and valid images.
Activity
vjuliaife commentedon Aug 25, 2026
I have experience with JavaScript/TypeScript and file-upload security. I’ll validate vehicle images by magic bytes and bounded dimensions, reject malformed and decompression-bomb files before storage, and add tests for spoofed, polyglot, truncated, and valid images.
grantfox-oss commentedon Aug 26, 2026
🦊 GrantFox — @vjuliaife has been assigned to this issue as part of the Third Campaign campaign!
Next steps:
Closes #190)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Aug 28, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!
@vjuliaife's PR #226 was approved and merged by @Obiajulu-gif.
🏆 @vjuliaife: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (812 total points). Track your full progress on GrantFox.
👏 Great work, @vjuliaife! Keep contributing to Chainmove.