惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
月光博客
月光博客
博客园_首页
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AWS News Blog
AWS News Blog
S
Securelist
T
Tailwind CSS Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
罗磊的独立博客
D
Docker
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
H
Help Net Security
Project Zero
Project Zero
P
Proofpoint News Feed
D
DataBreaches.Net
Recorded Future
Recorded Future
Simon Willison's Weblog
Simon Willison's Weblog
V2EX - 技术
V2EX - 技术
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
I
Intezer
Engineering at Meta
Engineering at Meta
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
S
Secure Thoughts
GbyAI
GbyAI
U
Unit 42
Blog — PlanetScale
Blog — PlanetScale
T
Threat Research - Cisco Blogs
The Last Watchdog
The Last Watchdog
Y
Y Combinator Blog
F
Fortinet All Blogs
博客园 - Franky
T
The Blog of Author Tim Ferriss
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone

鬼影的基地

CVE-2025-61638:Sanitizer::validateAttributes data-XSS 萌娘百科水平越权漏洞 萌娘百科评论区 IP 泄露 修复 iPhone 13 iOS 16 Safari 中的 Bug 命名空间 在 CSS 中进行数据类型转换 在 iOS 的 Apple Mail 中添加 QQ邮箱 CodeMirror url() Bug Safari animation Bug 在 macOS 上部署 Viper CSS 自适应简单 Table CSS 像素画的方法
萌娘百科头像魔术字 IP 泄露
鬼影233 · 2025-07-29 · via 鬼影的基地

前言

,星海子在 Help:沙盒留下了一笔编辑我对此魔术字进行了一次测试(已经过申请后被监督),并在萌娘百科官方限水编辑讨论群发布了初步的调查报告。

漏洞详情

初步调查

{{#avatar:萌百娘}}{{#avatar:萌百娘|res=128}} --> width=128,图源 256px 支持小数

64 <= res < 128 --> width=res,图源 64px(https://storage.moegirl.org.cn/moegirl/avatars/30749/latest.png!/sq/64)

{{#avatar:萌百娘|res=}}(或<0) --> width=""(自动同图源大小),图源 256px

不能 subst,且如果 subst 不存在用户,会暴露你的 IP

—— 初步调查报告

{{#avatar:}}

{{subst:#avatar:}}
头像的 alt 属性会记录提交者的 IP 地址

好吧,似乎只有 subst(替换引用) 未注册用户的头像才会暴露,前者会只返回每位访问者的 IP,一般人但凡预览了都会察觉。

但,真的只是这样吗?

Web 缓存欺骗攻击

前情提要:萌百在此前上线了页面缓存。

是的,不出意外,其第一个,“只返回每位访问者的 IP”,变成了只返回第一位访问者的 IP。 而其缓存是对 URL 查询字符串敏感的。

也就是说,我可以发送一个包含此头像的页面链接,并在链接中增加例如 uuid=077860A0-4976-4999-9F08-DB0A651D3A56,然后发送给目标,在例如确定对方查看页面后,我再次以类似方式访问此页面,就能命中缓存,获取对方的 IP。

怎么还有?

,我发现例如 https://mzh.moegirl.org.cn/api.php?format=json&utf8=true&formatversion=2&action=query&meta=myavatar&maxage=114514&smaxage=114514 在匿名用户访问的时候也会共享 IP 缓存。

,我发现例如 https://mzh.moegirl.org.cn/api.php?action=query&format=json&list=avatars&utf8=1&formatversion=2&avuserids=0&maxage=114514&smaxage=114514 在匿名用户访问的时候也会共享 IP 缓存。

最终都被修复。

题外话

即使版本被监督了,缓存也不会因此失效。