原样插入邮件正文可能造成 shell 命令注入
原文依据:2 处写入命令把 `[EMAIL BODY]` 放在 shell 单引号内。邮件正文由外部发件人控制;正文中的单引号可以结束该参数,随后附带的 shell 语法可能被解释为新命令。
如果代理通过 shell 将原始正文替换进示例命令,恶意邮件可能以运行代理的用户身份执行本地命令,从而读取或修改其可访问的数据。
流程先取得邮件内容,再要求把正文放进 shell 命令的单引号参数中。若代理用真实正文直接替换占位符,正文中的单引号可能提前结束参数,其后的 shell 字符可能被执行,影响用户文件、凭据或账户。来源未规定安全转义或通过文件/stdin 传递内容。不过,这仅证明存在可利用的命令构造风险,不证明任何邮件已触发执行。用户可要求作者改用不经 shell 插值的数据传递方式。
1. Find the message: `gws gmail users messages list --params '{"userId": "me", "q": "subject:important from:boss@company.com"}' --format table`2. Get message content: `gws gmail users messages get --params '{"userId": "me", "id": "MSG_ID"}'`3. Create a doc with the content: `gws docs documents create --json '{"title": "Saved Email - Important Update"}'`4. Write the email body: `gws docs +write --document-id DOC_ID --text 'From: boss@company.comSubject: Important Update[EMAIL BODY]'`查看另外 1 个位置
3. Create a doc with the content: `gws docs documents create --json '{"title": "Saved Email - Important Update"}'`4. Write the email body: `gws docs +write --document-id DOC_ID --text 'From: boss@company.comSubject: Important Update[EMAIL BODY]'`