other
- Location
connector.py:287- Finding
Local Hostname Disclosed to the Remote Connector Service
- Content
View full analysis
Vulnerability Details
File Location:
connector.py:287-288; transmitted byconnector.py:89-100
Vulnerability Type: Environment reconnaissance and unnecessary information disclosure
Risk Level: MediumVulnerable Code
python def resolve_default_connector_id() -> str: hostname = socket.gethostname().split(".")[0] return f"agos-{hostname}-{uuid.uuid4().hex[:6]}"The resulting identifier is transmitted during registration:
python def register_with_code(self, match_code: str) -> ConnectorSession: resp = self.http.post( self._url("/api/v2/openclaw/connectors/register-with-code"), json={ "match_code": match_code, "connector_id": self.connector_id, "client_version": VERSION, "capabilities": {"mode": "polling", "runtime": "python"}, }, timeout=self.timeout_sec, )Technical Analysis
The default connector identifier incorporates the local machine hostname. That identifier is subsequently sent to the configured remote API during connector registration.
A unique connector identifier is legitimate for the declared functionality, but including the hostname is not necessary: an opaque UUID would provide sufficient uniqueness. Hostnames can reveal usernames, employee names, machine roles, deployment stages, internal asset conventions, or other infrastructure details.
The code only retrieves the short hostname. The reviewed implementation does not explicitly collect an IP address or full FQDN.
Attack Path
- A user starts the connector without supplying
--connector-idorAITALK_CONNECTOR_ID. resolve_default_connector_id()reads the local hostname.- The hostname is embedded in the generated connector identifier.
- Registration sends that identifier to the configured
api_base. - The remote service can store and correlate the hostname-derived identifier wit ...[truncated 383 chars]
- A user starts the connector without supplying
- Remediation
View remediation
Remediation Suggestions
-
Generate an opaque identifier without incorporating host information:
python def resolve_default_connector_id() -> str: return f"agos-{uuid.uuid4().hex}" -
Persist the random identifier locally if stable connector identity is required.
-
Make hostname disclosure an explicit, documented opt-in rather than a default.
-
Clearly disclose all device metadata transmitted during registration.
-
Validate and restrict
api_basewhere possible so identifiers are not accidentally sent to an unintended endpoint.
-
