Skip to content

🚨 Security Issue: Unauthenticated Remote Drone Control via /track Endpoint #1239

@im-soohyun

Description

@im-soohyun

🚨 Security Issue: Unauthenticated Remote Drone Control via /track Endpoint

📝 Vulnerability Description

The current implementation of the drone control web application allows unauthenticated users to send commands to remotely move the drone by directly submitting HTTP POST requests to the /track endpoint. This lack of authentication and authorization checks allows potential attackers to control the drone remotely without permission.

🔍 Affected Code

File: drone_delivery.py

Vulnerable Endpoint: Line 171 (track endpoint)

@cherrypy.expose
def track(self, lat=None, lon=None):
    if(lat is not None and lon is not None):
        self.drone.goto([lat, lon], True)  # No authentication before sending commands to drone
    return self.templates.track(self.drone.get_location())

🛠️ Steps to Reproduce

An attacker can remotely control the drone position by executing a simple HTTP POST request without authentication:

curl -X POST http://localhost:8080/track -d "lat=37.4419&lon=-122.1430"

⚠️ Potential Risks

  • Unauthorized individuals can remotely manipulate drone positions.
  • Risk of physical damage, unauthorized surveillance, or other security incidents due to unauthorized drone control.

🔐 Recommended Mitigation

The authentication approach already used in the [command endpoint (lines 124-141)](https://github.com/dronekit/dronekit-python/blob/243ce0ac9c51504fc846e4ea1e35dbff03985871/examples/drone_delivery/drone_delivery.py#L124-L141) should be similarly implemented in the /track` endpoint:

@cherrypy.expose
def track(self, lat=None, lon=None):
    # Implement authentication check similar to /command endpoint here
    if not cherrypy.session.get('authenticated'):
        raise cherrypy.HTTPRedirect("/")
    
    if(lat is not None and lon is not None):
        self.drone.goto([lat, lon], True)

    return self.templates.track(self.drone.get_location())

Specifically, you should:

  • Add session-based authentication checks before accepting drone movement commands.
  • Ensure that only authorized users are able to interact with the drone through sensitive API endpoints.

📌 Additional References

Thank you for your attention to this security matter.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions