exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution
Posted Mar 20, 2024
Authored by kai6u

Lektor Static CMS version 3.3.10 suffers from an arbitrary file upload vulnerability that can be leveraged to achieve remote code execution.

tags | exploit, remote, arbitrary, code execution, file upload
SHA-256 | 12e46eeac4843dfaaf4f61083381648a44692cd6a4aade7ab73a5901f82f2336

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution

Change Mirror Download
# Exploit Title: Lektor static content management system Version: 3.3.10 Arbitrary File upload
# Date: 20/03/2024
# Exploit Author: kai6u
# Vendor Homepage: https://www.getlektor.com/
# Software Link: https://github.com/lektor/lektor/releases/tag/v3.3.10
# Version: 3.3.10
# Tested on: Ubuntu 22.04
# Summary:
Arbitrary File upload in Lektor exist, It is possible to upload file to any directory on the server.
Affected Version:
< Version Release v3.3.10 (https://github.com/lektor/lektor/releases/tag/v3.3.10)
Fixed Version:
Latest Version Release v3.3.11 (https://github.com/lektor/lektor/releases/tag/v3.3.11)
# Steps:
3.Steps
The following are the steps of an attack that an attacker might perform.
1.Arbitrary File Upload and Store the payload
Access the administrator console and use the Add Page function to create a file
containing the payload to the templates directory and prepare to execute the
command.
2.Execute Command
Next, execute arbitrary commands on the administrator console by referencing the
file containing the malicious payload as templates

# Description:
1 ) Access to the administrator console via NW first creates a contetns.lr file containing the payload using Lektor's Add Page feature, specifying the templates directory.(Attacker also can upload to any directory.)

Payload:

{{ ''.__class__.__mro__[1].__subclasses__()[276]('whoami',shell=True,stdout=-1).communicate()[0].strip()}} }}

2 ) Create a new page by specifying the created contents.lr as template.

3 ) Use the preview function to check the sample page with the specified templates.

# Impact
Since attackers can execute arbitrary commands on the target environment, they can.
1.Steal sensitive files on the server.
2.Browse like /etc/passwd file and configure it to allow SSH connections as an OS user.
3.Use the server as a stepping stone for another attack and perform malicious actions.
4.Encrypt all content in the server and demand money.
5.Shut down the server and disrupt the target.
This is very dangerous because commands can be executed if the administrator's consolecan be accessed via the NW

# References
https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection/jinja2-ssti
https://github.com/lektor/lektor/releases/tag/v3.3.11

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 Files
  • 28
    May 28th
    12 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close