python.insecure-uuid-version

返回列表 · CWE 索引

pythonWARNING规则详情

各语言消息对照

语言消息
de

UUID-Version 1 für die UUID-Erzeugung kann zu vorhersagbaren UUIDs auf Basis von Systeminformationen führen (etwa MAC-Adresse, Zeitstempel). Das kann Sicherheitsrisiken wie den Sandwich-Angriff eröffnen. Verwenden Sie stattdessen `uuid.uuid4()` für bessere Zufälligkeit und Sicherheit.

en

Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security.

fr

Utiliser la version 1 pour générer des UUID peut produire des UUID prévisibles fondés sur des informations système (adresse MAC, horodatage, etc.). Cela peut créer des risques de sécurité comme l'attaque du sandwich. Utilisez plutôt `uuid.uuid4()` pour un meilleur aléa et une meilleure sécurité.

ja

UUID バージョン 1 で UUID を生成すると、システム情報(MAC アドレス、タイムスタンプなど)に基づいて予測可能な UUID が生成され、サンドイッチ攻撃などのセキュリティリスクにつながる可能性があります。より優れたランダム性とセキュリティを得るために、代わりに `uuid.uuid4()` を使用してください。

ko

UUID 버전 1로 UUID를 생성하면 시스템 정보(MAC 주소, 타임스탬프 등)를 기반으로 예측 가능한 UUID가 생성되어 샌드위치 공격 등의 보안 위험이 초래될 수 있습니다. 더 나은 무작위성과 보안을 위해 `uuid.uuid4()`를 사용하십시오.

ru

Генерация UUID версии 1 даёт предсказуемые UUID на основе системных данных (MAC-адрес, отметка времени) — возможны риски безопасности вроде атаки «сэндвич». Для лучшей случайности и безопасности используйте `uuid.uuid4()`.

zh

用 UUID 版本 1 生成 UUID 会基于系统信息(MAC 地址、时间戳等)产生可预测的 UUID,可能带来三明治攻击等安全风险。为获得更好的随机性与安全性,请改用 `uuid.uuid4()`。

zh-Hant

用 UUID 版本 1 生成 UUID 會基於系統資訊(MAC 位址、時間戳等)產生可預測的 UUID,可能帶來三明治攻擊等安全風險。為獲得更好的隨機性與安全性,請改用 `uuid.uuid4()`。

CWE 知识卡

语言名称修复建议
deVerwendung von Werten mit unzureichender ZufälligkeitVerwenden Sie für Sicherheitszwecke stets kryptografisch sichere Zufallsquellen (SecureRandom/crypto.randomBytes/secrets); Math.random und Zeitstempel sind tabu.
en——
frUtilisation de valeurs insuffisamment aléatoiresPour tout usage de sécurité, utilisez exclusivement des sources aléatoires cryptographiquement sûres (SecureRandom/crypto.randomBytes/secrets) ; bannissez Math.random et les horodatages.
jaランダム性が不十分な値の使用セキュリティ用途では暗号論的に安全な乱数源(SecureRandom/crypto.randomBytes/secrets)を必ず使用し、Math.random やタイムスタンプの使用は禁止してください。
ko무작위성이 부족한 값 사용보안 용도로는 예외 없이 암호학적으로 안전한 난수 소스(SecureRandom/crypto.randomBytes/secrets)를 사용하고, Math.random과 타임스탬프는 금지하십시오.
ruИспользование значений с недостаточной случайностьюДля задач безопасности применяйте только криптостойкие источники случайности (SecureRandom/crypto.randomBytes/secrets); Math.random и отметки времени запрещены.
zh使用随机性不足的值安全用途一律使用密码学安全随机源(SecureRandom/crypto.randomBytes/secrets),禁用 Math.random 与时间戳。
zh-Hant使用隨機性不足的值安全用途一律使用密碼學安全亂數源(SecureRandom/crypto.randomBytes/secrets),停用 Math.random 與時間戳。

OWASP

A02:2021 - Cryptographic Failures

元数据

likelihoodLOW
impactMEDIUM
confidenceMEDIUM

修复字段

fix无
fix-regex有

上游规则源

github.com/opengrep/opengrep-rules/tree/main/python/lang/security/insecure-uuid-version.yaml