Weblate の脅威モデル

対象範囲: Weblate のコア Web アプリケーション、ユーザーブラウザとの通信、バックエンド(Web サーバー、WSGI、データベース、データストア、Celery)および外部 VCS 連携を含む一連のコンポーネントを対象とします。

Assumptions: Standard Weblate deployment with typical components (nginx/Apache, granian/Gunicorn/uWSGI, PostgreSQL, datastore, Celery) and user roles (unauthenticated user, authenticated user, reviewer, project manager, administrator, project-scoped API token).

Webhook endpoints for some VCS integrations are intentionally compatibility-oriented and can accept unauthenticated deliveries from supported forges. Weblate therefore treats webhook-triggered repository updates as a deployment-hardened interface rather than a cryptographically authenticated one by default.

Until native authenticated integrations are available for these platforms, webhook abuse resistance depends on compensating controls such as reverse-proxy rate limiting, request size limits, minimizing public exposure, and monitoring.

システム概要と範囲

Weblate は、Django 上に構築されたオープンソースの Web ベース翻訳プラットフォームです。Git リポジトリと密接に連携して翻訳を管理し、自動化、フック、VCS 同期など、CI/CD スタイルの機能も提供します。

Authorization in Weblate is not limited to instance-wide administrator versus regular user access. Permissions can be delegated per site, project, component, language, glossary, or other scope, including dedicated VCS, translation memory, screenshot, review, and project access management permissions. Project-scoped API tokens can also be granted team memberships and permissions similar to users.

保護すべき対象(Assets):

  • 機密性: 翻訳文字列、VCS 連携用の API キー / 認証情報、ユーザー認証情報(パスワード、2FA シークレット)、ユーザーの個人データ(メールアドレス、氏名)、セッション トークン、監査ログ、非公開プロジェクト データ。

  • 整合性: 翻訳文字列の内容、VCS リポジトリの整合性、プロジェクトおよびコンポーネントの構成、ユーザー権限、監査ログ。

  • 可用性: Weblate の Web 操作画面、VCS 連携、データベースへのアクセス、バックグラウンド タスク処理。

  • 信頼性 / 否認防止: 翻訳コミット履歴、翻訳に対するユーザー属性情報、管理操作に関する監査ログ。

概念的データフロー図

digraph translations { graph [fontname = "sans-serif", fontsize=10]; node [fontname = "sans-serif", fontsize=10, margin=0.1, height=0, style=filled, fillcolor=white, shape=note]; edge [fontname = "sans-serif", fontsize=10, dir=both]; "External user (browser)" -> "Web server (nginx/Apache)" [label="HTTPS"]; "External webhook source" -> "Web server (nginx/Apache)" [label="HTTPS webhook"]; "Web server (nginx/Apache)" -> "Weblate application (WSGI, Celery)" [label="Internal API"]; "Weblate application (WSGI, Celery)" -> "Database (PostgreSQL)" [label="Database access"]; "Weblate application (WSGI, Celery)" -> "Datastore (Valkey/Redis)" [label="Key/value access"]; "Weblate application (WSGI, Celery)" -> "Internal VCS repository" [label="Filesystem access"]; "Weblate application (WSGI, Celery)" -> "External VCS repository" [label="Git/API"]; "Weblate application (WSGI, Celery)" -> "Logging (SIEM)" [label="GELF"]; }

信頼の境界

  • インターネット ↔ Web サーバー: 最前線の防御とやり取りする公衆インターネット通信。

  • Webhook source ↔ Web server: External code hosting services or other callers invoking repository hooks, sometimes with unauthenticated endpoints enabled per project.

  • Web サーバー ↔ Weblate アプリケーション: リバースプロキシ / Web サーバーとアプリケーション ロジック間の通信。

  • Weblate application ↔ Database: Application logic accessing persistent and cached data.

  • Weblate アプリケーション ↔ ロギング: ログを生成するアプリケーションロジック。

  • Weblate アプリケーション ↔ 内部 VCS リポジトリ: VCSリポジトリのローカル コピーと対話するアプリケーション ロジック。

  • Weblate アプリケーション ↔ 外部 VCS リポジトリ: Weblate が外部のコード ホスティング プラットフォームへ接続します。

  • Privileged user configuration ↔ Outbound network: Project and integration settings can cause Weblate to initiate connections to external VCS hosts or other services.

  • Imported backup archive ↔ Weblate application/filesystem: Backup restore processes attacker-controlled archive contents, metadata, and VCS state.

  • Unauthenticated caller ↔ Authenticated user/token: Different privilege levels for browser, API, and webhook access.

  • Authenticated user/token ↔ Project manager/reviewer/VCS manager: Delegated project- and component-scoped permissions create additional privilege boundaries inside the application.

脅威の識別

コンポーネントと相互作用

STRIDE 脅威カテゴリー

脅威の説明

潜在的な影響

Web サーバー (NGINX / Apache)

DoS

サービス拒否: 攻撃者が Web サーバーにリクエストを殺到させ、Weblate の動作を停止させる。

翻訳作業ができなくなる。

情報漏えい

設定情報の公開: サーバーの設定ミスにより、機密ファイル(例:設定ファイル、秘密鍵)が外部に公開される。

認証情報や内部構成の公開。

データ改ざん

悪意のあるリクエストの挿入: 攻撃者が HTTP ヘッダーやリクエスト ボディに悪意あるデータを挿入する。

バックエンドで適切に処理されない場合、SQL インジェクション、XSS、その他のインジェクションが発生する可能性。

Webhook handling

なりすまし

Forged webhook delivery: An attacker submits a fake webhook payload to trigger repository updates or other automation, especially when unauthenticated hooks are enabled.

Unauthorized repository synchronization, noisy task execution, or follow-on abuse of automation paths.

データ改ざん

Payload manipulation or replay: An attacker replays or modifies webhook payloads so Weblate processes repository states or branches different from the legitimate event.

Unexpected updates, repository confusion, or misuse of privileged VCS credentials.

DoS

Hook flooding: An attacker sends excessive webhook requests or oversized payloads, overwhelming request handling or background workers.

Weblate slowdown or unavailability.

情報漏えい

Repository enumeration via webhook responses: An attacker probes webhook payloads and learns whether repositories, branches, or components exist based on response metadata.

Disclosure of private project structure, enabled hooks, or component identifiers.

否認

Limited webhook attribution: Hook-triggered updates are recorded as coming from a service bot rather than a forge-authenticated principal.

Reduced forensic confidence when investigating malicious or disputed hook activity.

Weblate アプリケーション

なりすまし

ユーザーのなりすまし: 攻撃者が正規ユーザーのセッションにアクセスする(セッションハイジャック、認証情報の漏えいによる不正ログイン)。

不正な翻訳や不正なリポジトリへの接続。

(WSGI / Celery)

データ改ざん

不正な翻訳の改ざん: 悪意あるユーザー、または脆弱性を悪用した攻撃により、翻訳内容、プロジェクト設定、VCS 連携設定が改ざんされる可能性があります。

誤った翻訳、ビルドの破損、VCS フック経由の RCE(リモートコードの実行)。

データ改ざん

VCS 連携の操作: 攻撃者が Weblate と VCS とのやり取りを操作します(例:不正なリポジトリ URL を用いて悪意あるコマンドを注入し、適切にサニタイズされていない場合に RCE を引き起こします)。

標的のプロジェクトへのコード注入、データの不正流出。

否認

帰属不明の変更: 誰が、もしくは何が(責任を負うべきユーザーやシステム)、を特定できない方法で、悪意ある変更が行われます。

監査および責任追跡の困難さ。

情報漏えい

機密データの漏えい: SQL インジェクションや安全でない API エンドポイント、あるいはエラーにより機密データ(他のユーザーの翻訳、VCS 認証情報、サーバー情報など)が公開されます。

プライバシー侵害、知的財産の窃取。

情報漏えい

VCS 認証情報の公開: Weblate に保存されている VCS 認証情報(SSH 鍵やトークン)が攻撃者よってアクセスされます。

統合されたコードリポジトリへの直接アクセス。

DoS

リソースの枯渇: 攻撃者によって過剰なバックグラウンド タスクや非効率なデータベース クエリが実行され、システムの速度低下やクラッシュを引き起こします。

Weblate が使用不能に陥る。

特権への昇格

ロールのエスカレーション: 一般の翻訳者が管理者権限を取得します。

システム全体の侵害。

特権への昇格

コマンド インジェクション: リポジトリ URL やアドオンに対する不適切な入力検証により、任意のコードが実行されます。

システム侵害、データ流出。

Backup import / restore

DoS

Archive amplification during restore: A crafted backup contains many members or a large aggregate uncompressed size, exhausting disk, memory, worker time, or inode capacity.

Restore-time denial of service and possible service degradation for the instance.

データ改ざん

Malicious backup metadata or VCS state: A crafted backup restores misleading project metadata or unsafe repository state despite path validation and schema checks.

Corrupted restored projects, unsafe repository state, or administrative confusion.

データベース / データストア

データ改ざん

データ破損: データベースへ直接アクセスされることで、翻訳文字列、ユーザーデータ、設定内容が改ざんされます。

システムの不具合、データ整合性の喪失。

情報漏えい

機密データへのアクセス: データベース / データストアへの不正アクセスにより、保存されているすべてのデータ(資格情報、翻訳メモリ、ユーザー プロファイル)が公開されます。

大規模なデータ流出。

DoS

データベースの枯渇: 攻撃者が大量のクエリをデータベースやデータストアに送りつけたり、メモリや使用可能な接続を使い果たします。

Weblate が使用不能に陥る。

VCS 連携

データ改ざん

Weblate からの悪意あるコミット: 侵害された Weblate が、上流リポジトリへ悪意ある変更をプッシュします。

対象プロジェクトへのマルウェアやバックドアの導入。

否認

偽のコミット属性: Weblate が誤ったユーザー名で変更をコミットします(例:管理者が翻訳者の同意なしに、その翻訳者名義でコミットを強制する場合)。

説明責任の問題。

Outbound integrations / VCS configuration

情報漏えい

Server-side request forgery or unintended internal reachability: A privileged user configures repository or integration endpoints that cause Weblate to connect to internal or otherwise restricted hosts.

Exposure of internal services, metadata endpoints, or restricted network paths.

ユーザー操作

なりすまし

フィッシング / ソーシャル エンジニアリング: 攻撃者がユーザーを騙して、Weblate や連携された VCS アカウントの認証情報を開示します。

アカウントの侵害。

(Web UI)

データ改ざん

クロスサイトスクリプティング(XSS): 翻訳内容やユーザー プロファイルに悪意あるスクリプトが埋め込まれると、他のユーザーのブラウザー上で実行されます。

セッション ハイジャック、認証情報の窃取、改ざん(デフェイス)。

情報漏えい

クリック ジャッキング / UI 修正攻撃: 攻撃者が Weblate の画面上に悪意ある UI 要素を重ねて表示し、ユーザーに意図しない操作を行わせます。

不正操作、データ改ざん。

情報漏えい

UI 内の機密データ: 認証の欠陥により、機密データ(例:他のユーザーのメールアドレス)が UI で意図せず公開される。

プライバシー侵害。

緩和戦略

  • 認証と認可:
    • 強力なパスワード ポリシー。参照: パスワード セキュリティ

    • 強制的な 2FA の有効化。参照: 二要素認証

    • 堅牢なセッション管理。

    • Role-based access control (RBAC) to enforce the least privilege (for example separating translation, review, VCS, translation memory, screenshot, and project access management permissions), see アクセス制御.

    • 外部のアイデンティティ プロバイダー(SAML、OAuth、LDAP)との統合。参照: 認証

  • Webhook security:
    • Current product limitation: webhook authenticity is not uniformly enforced in-app for all supported forge integrations.

    • Treat webhook endpoints as deployment-hardened interfaces and enable them only where necessary, see 通知フック and フックの有効化.

    • Deployment controls required today include reverse-proxy rate limiting, request size limits, optional source-IP filtering, minimizing public exposure, and alerting on webhook spikes.

    • Validate webhook event type and payload before triggering repository updates or tasks.

    • Future product direction is to replace compatibility webhooks with native authenticated integrations that validate source authenticity before scheduling repository updates.

  • 入力検証と出力エンコーディング:
    • インジェクション攻撃(SQL インジェクション、コマンド インジェクション、XSS)を防ぐために、すべてのユーザー入力(フォーム、API リクエスト、VCS URL)を厳密に検証します。

    • XSS を防ぐために、Web UI に表示されるすべてのユーザー提供データに対してコンテキスト認識出力エンコーディングを行います。

  • VCS 連携のセキュリティ:
    • VCS 認証情報に対する最小権限の原則(可能な場合は読み取り専用アクセスを使用し、トークンのスコープも必要最小限に制限する)。

    • VCS 認証情報の安全な保管。

    • VCS から取得するすべてのデータ(例:ファイル名、ブランチ名、表示される可能性のあるコミットメッセージなど)に対して、厳密なサニタイズと検証を行います。

    • Git / Mercurial コマンドを安全に実行します(ユーザー制御の入力によるシェルの実行を回避)。

    • Document and review hostname allowlisting and private-network restrictions for outbound integrations where deployments need to constrain server-initiated connections.

  • Backup import security:
    • Treat backup archives as untrusted input and validate both metadata and extracted paths.

    • Enforce aggregate archive-size and extraction-budget limits, not only per-entry checks.

    • Monitor restore failures and unusually large imports as potential abuse indicators.

  • データ保護:
    • 保存する機密データを暗号化します。

    • 転送中のデータを暗号化します(すべての HTTP/S および VCS 通信に TLS/SSL を使用)。

    • データベースの強化(Weblate ユーザーの権限を最小限にし、強力なパスワードを使用)。

  • システムの強化:
    • OS、Weblate、およびすべての依存関係に定期的にパッチを適用します。

    • OS 上の Weblate ユーザー アカウントに最小権限の原則を適用します。

    • ネットワークのセグメンテーション(例:データベースとデータストアを公開アクセスから分離する)。

    • WAF(Webアプリケーションファイアウォール)の使用。

  • ログ記録と監視:
    • すべてのセキュリティ関連イベント(ログイン、ログイン失敗、権限変更、重要な設定変更、VCS 操作など)を包括的に監査ログとして記録します。

    • セキュリティ インシデントに対する集中管理されたログ収集とアラート通知(例:Graylog によるログ管理)。

  • 安全な開発手法:
    • セキュリティに重点を置いたコードレビューを実施します。

    • 静的アプリケーション セキュリティ テスト(SAST)および動的アプリケーション セキュリティ テスト(DAST)を実施します。参照: Weblate のソースコード

    • 依存関係の脆弱性スキャンを実施します。参照: 依存関係

    • 定期的なセキュリティ監査と侵入テスト。

  • エラー処理:
    • 機密の内部情報を明らかにしない一般的なエラー メッセージを使用します。