-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Is this a possible security vulnerability?
- This is NOT a possible security vulnerability
Describe the bug
So this is a bit of a security vulnerability, but it's already public, and we don't have any official release yet, so 🤷♂️
It is possible for a malicious actor to cause Polaris to OOM by flooding the server with requests having random realm IDs.
This is possible because a) the default RealmContextResolver does not validate that the realm exists and b) many components maintain an unbounded cache of objects keyed by realm ID, e.g.:
RealmScopeContextRealmEntityManagerFactoryRealmTokenBucketRateLimiterLocalPolarisMetaStoreManagerFactory
I suggest the following mitigation measures:
- The default
RealmContextResolverMUST validate the realm IDs – which means that we need to persist realms in the database or somewhere else (maybe in configuration?) - Any components caching by realm ID should use a bounded cache with proper eviction policies.
To Reproduce
No response
Actual Behavior
No response
Expected Behavior
No response
Additional context
No response
System information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working