Tainted flow: 'VOICES_MAP_PATH' from os.environ.get (line 13, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
*本文件由 update_voices_map.py 自动更新* """ with open(VOICES_MAP_PATH, "w", encoding="utf-8") as f: f.write(content) print(f"✅ 已更新 {VOICES_MAP_PATH}")- Confidence
- 76% confidence
- Finding
- The output file path is taken directly from the TTS_VOICES_MAP_PATH environment variable and then opened for writing without validation. In environments where untrusted parties can influence environment variables, this can overwrite arbitrary files accessible to the process, causing data loss or corruption.
