微信智能体插件 dsh-plugin-wechat 报告媒体分支覆盖 prompt,caption 未中和可致标签注入
微信智能体插件报告媒体说明未中和标签
AI 导读
微信智能体插件 dsh-plugin-wechat 的一个 issue 指出,媒体消息分支会重建 prompt 并覆盖此前已处理好的内容,caption 中的 weixin_ 标签未经中和就进入 prompt,形成提示注入入口。报告定位到 src/index.js:2187 的 prompt = parts.join('\n\n') 覆盖了 quoted 与 neutralizeTags(message.text) 组成的结果,以及 src/media/inbound.js 中 describeInboundMedia 把原始 caption 直接拼入末尾。由此带来三个后果,附件下载失败时用户输入的文字完全不进入 prompt,caption 可注入 weixin_ 标签,带媒体消息的引用回复被整体丢弃,报告将影响定为高。