T09 · Insecure Skill Coding Practices
- Location
references/examples.md:460- Finding
Client-Authoritative Movement Allows Position and Rotation Forgery
- Content
View full analysis
Vulnerability Details
File Location:
references/examples.md, lines 460-464
Vulnerability Type: Unvalidated client-controlled network state
Risk Level: MediumVulnerable Code
csharp [ServerRpc] private void UpdateNetworkPositionServerRpc(Vector3 position, Quaternion rotation) { networkPosition.Value = position; networkRotation.Value = rotation; }Technical Analysis
The server RPC accepts a position and rotation supplied by the owning client and writes those values directly into replicated network state. It performs no validation of:
- Maximum displacement or movement speed
- Time elapsed between updates
- Collision and path legality
- World boundaries
- Current movement state
- Teleport authorization
- RPC submission rate
A modified client can therefore submit arbitrary transform values. Because the server treats these values as authoritative and replicates them, this pattern undermines the client-server authoritative model recommended by the Skill itself.
Attack Path
- An attacker joins a multiplayer session using a client they control.
- The attacker modifies or hooks the client to invoke
UpdateNetworkPositionServerRpcwith forged coordinates or rotations. - The server accepts the values without checking whether the movement is physically or logically possible.
- The server assigns the forged transform to
networkPositionandnetworkRotation. - The invalid state is replicated to other clients, allowing the attacker to teleport, cross barriers, or reach restricted locations.
Impact Assessment
Exploitation does not grant operating-system privileges, but it can compromise multiplayer game integrity within the affected session. An attacker may:
- Teleport across the map
- Move through geometry or restricted areas
- Evade combat or positional checks
- Reach objectives or resources illegitimately
- Gain an unfair competitive advantage
- Cause forged movement state to be displayed to other clients
...[truncated 125 chars]
- Remediation
View remediation
Remediation Suggestions
Adopt server-authoritative movement rather than accepting final transforms from clients:
- Send bounded input commands, such as movement direction, jump, and dash requests, instead of absolute coordinates.
- Simulate movement and collision on the server.
- Verify RPC sender ownership and authorization.
- Validate displacement against elapsed time, maximum speed, acceleration, and permitted movement abilities.
- Reject movement crossing blocked geometry or leaving configured world boundaries.
- Permit teleportation only through explicit, server-approved gameplay actions.
- Rate-limit movement RPCs and reject stale, duplicate, or excessively frequent updates.
- Correct invalid client state using authoritative server snapshots.
- Log repeated validation failures and apply suitable anti-cheat responses.
- Add automated tests covering forged coordinates, excessive velocity, wall traversal, out-of-bounds movement, and RPC flooding.
