🇰🇷 한글 설명
Nexmo 모듈에서 api_key와 api_secret이 no_log 설정에도 불구하고 GET 요청의 쿼리 파라미터로 포함되어 URL 인코딩되는 취약점이 발견되었습니다. 이로 인해 민감한 인증 정보가 Ansible 로그, 서버 액세스 로그, 네트워크 프록시 등에 평문으로 노출될 수 있습니다.
💡 쉬운 설명
비밀번호와 같은 중요한 정보가 인터넷 주소창에 그대로 노출되어 기록되는 보안 결함입니다. 이로 인해 로그 파일이나 네트워크 감시 도구를 통해 비밀번호가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
Module: plugins/modules/nexmo.py
CVSS 3.1: 6.5 MEDIUM — AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Issue: api_key and api_secret are declared no_log=True at the input level, but both credentials are immediately URL-encoded into a GET request as query parameters, bypassing all no_log protection.
Vulnerable Code (lines 82-93):
msg = {
"api_key": module.params.get("api_key"),
"api_secret": module.params.get("api_secret"),
"from": module.params.get("src"),
"text": module.params.get("msg"),
}
url = f"{NEXMO_API}?{urlencode(msg)}"
response, info = fetch_url(module, url, headers=headers)
Observed Output:
https://rest.nexmo.com/sms/json?api_key=a1b2c3d4&api_secret=MyS3cr3tK3y!!&from=AnsibleBot&to=15551234567&text=Hello
Exposure Vectors:
Ansible verbose output (-vvv) logs the full request URL
Vonage/Nexmo server access logs record credentials in query string
HTTP proxies, SIEM, and network inspection tools capture the full URL
AWX/Automation Controller network debug logs
Fix: Switch to POST with credentials in the request body:
data = urlencode({"api_key": api_key, "api_secret": api_secret,
"from": src, "to": number, "text": msg})
fetch_url(module, NEXMO_API, data=data, method="POST",
headers={"Content-Type": "application/x-www-form-urlencoded"})
📍 영향받는 시스템
Ansible Nexmo module (plugins/modules/nexmo.py)
⚔️ 공격 벡터
네트워크 로그, Ansible 상세 출력(-vvv), 프록시 서버 및 SIEM 시스템을 통한 민감 정보 탈취
🛡️ 대응 방법
인증 정보를 URL 쿼리 파라미터가 아닌 POST 요청의 Body에 포함하도록 수정
🔧 검증 코드
명령어 결과로 해당 코드가 출력되면 GET 방식의 URL 파라미터 노출 취약점이 존재하는 상태입니다.
grep -r 'url = f"{NEXMO_API}?{urlencode(msg)}"' plugins/modules/nexmo.py
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
Cisco Crosswork Network Controller