other
- Location
scripts/make_webm.py:76- Finding
Animated stickers are uploaded to a third-party file host by default
- Content
View full analysis
Vulnerability Details
File Location:
scripts/make_webm.py:26-32,scripts/make_webm.py:76-99;scripts/sticker.py:109-111
Vulnerability Type:other: Default Third-Party Data Disclosure
Risk Level: MediumVulnerable Code
python def make_webm( frames_dir: str, output_path: str = None, fps: int = 24, duration: float = None, upload: bool = True, ) -> str:python if upload: _upload(output_path) return output_path def _upload(filepath: str): """Upload to tmpfiles.org and print a direct download URL.""" print("Uploading to tmpfiles.org ...") try: with open(filepath, "rb") as f: data = f.read() boundary = "----FormBoundary7MA4YWxkTrZu0gW" filename = Path(filepath).name body = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="file"; filename="{filename}"\r\n' f"Content-Type: video/webm\r\n\r\n" ).encode() + data + f"\r\n--{boundary}--\r\n".encode() req = urllib.request.Request( "https://tmpfiles.org/api/v1/upload", data=body, headers={"Content-Type": f"multipart/form-data; boundary={boundary}"}, )python if args.no_upload: cmd.append("--no-upload") result = subprocess.run(cmd, capture_output=False)Technical Analysis
The WebM generation function enables uploads by default through
upload: bool = True. The primary workflow only suppresses this behavior when the user explicitly supplies--no-upload. Consequently, an animated sticker derived from a user-supplied photo or artwork is read in full and transmitted over HTTPS totmpfiles.org.This behavior is documented and is not covert exfiltration or evidence of malicious intent. However, third-party disclosure is unnecessary for local sticker generation, and an ...[truncated 1307 chars]
- Remediation
View remediation
Remediation Suggestions
- Change the library default from
upload: bool = Truetoupload: bool = False. - Replace the opt-out
--no-uploadworkflow with an explicit opt-in--uploadoption. - Before uploading, display the destination, identify the file being transferred, and require affirmative user consent.
- Clearly document that the URL may be accessible to anyone who possesses it and disclose the external service's applicable retention policy.
- Keep local output generation as the default and allow users to upload the resulting document directly to Telegram.
- If third-party hosting remains supported, consider configurable approved providers and avoid presenting temporary hosting as a required pipeline step.
- Change the library default from
