-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Summary
Multiple handlers access nested properties without null/undefined checks, allowing clients to crash the server with malformed payloads.
Affected Code (examples)
server-game/start-game.js:230-msg.servicesMeta.startTimeserver-services/start-services.js:189-ss.config.services.ratelimit.sensitive.cmdsserver-game/src/client.js:345-346-this.room.perm.inputCmd,this.room.censor.detectserver-game/src/client.js:562-569-this.player.modifiers.*(multiple)server-services/src/ratelimit.js:37,41,52,56,70,71,84,85- nested config accesses
Vulnerability
When expected objects/properties are undefined, JavaScript throws TypeError, crashing the process if unhandled.
Impact
- Remote server crash with single crafted message
- Denial of service
Proof of Concept
{"cmd":"requestConfig"} // crashes on msg.servicesMeta.startTime accessRecommended Fix
- Use optional chaining (
?.) for all nested accesses - Add input validation/schema checks at message boundaries
- Provide safe defaults for config paths
Example:
// Before:
if ((msg.servicesMeta.startTime > ss.config.servicesMeta.startTime) && ss.isPerpetual)
// After:
if ((msg.servicesMeta?.startTime > ss.config.servicesMeta?.startTime) && ss.isPerpetual)References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels