Pair a consumer Bluetooth headset to a laptop or phone and watch the operating system's audio routing table. Within a second of the handshake, the new peripheral routinely becomes the default system microphone over the Hands-Free Profile (HFP), while companion widgets and ambient desktop assistants read its broadcast name and track metadata into memory.
That convenience default predates tool-calling voice agents. Once an assistant can approve transfers, export contacts, or forward verification codes from spoken input and ambient device context, a cheap wireless audio peripheral stops being just a speaker. It sits directly on an unverified instruction bus.
BLE Voice Peripheral Lab models all three failure modes in zero-dependency Python (github.com/ghostintheprompt/ble_voice_peripheral_lab) alongside a read-only macOS CoreAudio and Bluetooth auditor (make audit-mac).
When an audio peripheral becomes an instruction source
In vulnerable/stack.py, three convenience behaviors line up end to end:
First, budget quick-connect and multipoint headsets frequently advertise NoInputNoOutput (Just Works, mitm_protection=False) or leave pairing windows open outside a physical button press (CWE-287, MITRE ATT&CK T1200). The unguarded host accepts the unauthenticated pairing state and immediately flips active_mic_source from builtin_chassis_mic to bt_hfp_external without asking the user.
Second, Bluetooth Friendly Name descriptors, Bluetooth Low Energy (BLE) Generic Attribute Profile (GATT) Device Name (0x2A00), and Audio/Video Remote Control Profile (AVRCP) Now Playing strings are attacker-controlled fields broadcast over the air (CWE-79, CWE-74, OWASP LLM01). Rendering them raw inside a companion HTML status pill introduces cross-site scripting (<script>), while concatenating them into an ambient assistant's system context lets a hidden directive trigger export_contacts.
Third, once routed as bt_hfp_external, a rogue or compromised peripheral can inject synthetic speech frames (hfp_rms = 0.20+) into a live voice-agent session while playing silence in the earcups (CWE-346, OWASP LLM06). The user sits in a quiet room (chassis_rms < 0.001) and hears nothing while the voice pipeline executes approve_transfer.
Running the read-only macOS auditor (make audit-mac) on a real desktop with consumer Bluetooth headphones connected confirms the routing precondition live (rf_transmissions: 0): CoreAudio marks coreaudio_device_type_bluetooth as coreaudio_default_audio_input_device: spaudio_yes (bluetooth_seized_default_mic: true).
Numeric comparison, untrusted envelopes, and dual-mic presence
Following Bluetooth Core Specification v5.4 (Vol 3, Part H, LE Secure Connections), HardenedHostStack in fixed/stack.py rejects NoInputNoOutput (Just Works), requires sc_flag=True and confirmed DisplayYesNo Numeric Comparison inside a 30-second button-press window, enforces a proximity received-signal floor (>= -68 dBm), and keeps builtin_chassis_mic active until the user explicitly approves switching microphone input.
For over-the-air text fields, sanitize_peripheral_label applies Unicode NFKC normalization, strips control and format characters (Cf, including zero-width space \u200b and bidirectional overrides), restricts labels to a 40/48-character allowlist, HTML-escapes UI rendering, and isolates peripheral metadata inside a JSON data envelope marked instructions_permitted: false.
For voice commands, external Bluetooth HFP microphones are never treated as equivalent to an unlocked device's built-in microphone. High-impact tools (approve_transfer, forward_2fa_code, export_contacts) arriving over bt_hfp_external require both unlocked-screen confirmation and dual-microphone acoustic presence correlation against the local chassis mic:
acoustic_match = (chassis_rms >= CHASSIS_SPEECH_RMS_FLOOR) and (corr >= MIN_DUAL_MIC_CORR)
if frame.proposed_tool in HIGH_IMPACT_TOOLS:
if not screen_unlocked_and_confirmed or not acoustic_match:
return {
"executed": False,
"tool": frame.proposed_tool,
"reason": "external_bt_high_impact_blocked",
}
In detection/audit_rules.py, JSONL rules BLE-001 through BLE-004 flag Just Works or out-of-window pairing attempts, unconsented HFP mic takeovers, descriptor injection strings, and silent-room HFP voice commands (0 false positives on benign pairing and weather queries; four of four rule families triggered on attack traces).
Test suite and physical-world limits
test_01_quick_connect_just_works_and_silent_mic_takeover ... ok
test_02_gatt_device_name_and_avrcp_metadata_injection ... ok
test_03_hfp_silent_room_voice_agent_injection_vs_source_tiering ... ok
test_04_jsonl_detection_rules_precision_and_recall ... ok
test_05_macos_readonly_bluetooth_audio_parser_and_redaction ... ok
Ran 5 tests in 0.001s (OK)
Two limits apply. First, this lab models host-side pairing state transitions, descriptor ingestion, and voice-agent audio routing in deterministic Python; it claims no firmware vulnerability in any headphone vendor and transmits zero radio-frequency packets. Second, dual-microphone acoustic correlation drops when a phone or laptop sits muffled inside a closed bag or pocket, so production voice agents should fall back to explicit screen or watch confirmation rather than silently dropping legitimate hands-free requests.
GhostInThePrompt.com // A paired headset owns the speaker, not the user's authority.