Skip to content

Security: Fix critical null pointer dereference in ConfigStore#89

Open
trek-e wants to merge 2 commits intorubenwe:masterfrom
trek-e:security/fix-null-pointer-configstore
Open

Security: Fix critical null pointer dereference in ConfigStore#89
trek-e wants to merge 2 commits intorubenwe:masterfrom
trek-e:security/fix-null-pointer-configstore

Conversation

@trek-e
Copy link
Copy Markdown

@trek-e trek-e commented Jan 24, 2026

Summary

  • Fixes a critical null pointer dereference vulnerability in ConfigStore.cs
  • ZipFile.GetEntry() can return null if the entry doesn't exist, but the code was calling .Open() directly on the result
  • This would cause a NullReferenceException crash when loading a corrupted or tampered config archive

Security Impact

  • Severity: Critical
  • Attack Vector: Maliciously crafted or corrupted zip config files
  • Impact: Application crash (denial of service)

Fix

Added null check before calling Open() on the ZipArchiveEntry. If the entry is missing, a descriptive FileNotFoundException is thrown which is handled by the existing error handling.

Test plan

  • Verify normal config loading still works
  • Verify graceful handling when archive entry is missing

🤖 Generated with Claude Code

trek-e and others added 2 commits January 23, 2026 18:39
- STACK.md - Technologies and dependencies
- ARCHITECTURE.md - System design and patterns
- STRUCTURE.md - Directory layout
- CONVENTIONS.md - Code style and patterns
- TESTING.md - Test structure
- INTEGRATIONS.md - External services
- CONCERNS.md - Technical debt and issues
ZipFile.GetEntry() can return null if the entry doesn't exist in the
archive. The code was calling .Open() directly on the result without
checking for null first, which would cause a NullReferenceException.

This fix adds a null check and throws a descriptive FileNotFoundException
if the entry is missing, which is then properly handled by the outer
catch block.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant