Yauzabomber
Server-Side Template Injection (SSTI) in SMS template
Description
Solution
Unintended
@app.route("/shop/", methods=['POST'])
@require_authorization
def shop_form(current_user):
item_id = int(request.form.get('id'))
user_obj, item_obj = db.ShopItem().buy_item(item_id, current_user.id)
shop_items = db.ShopItem().list_items()
if user_obj is None:
return render_template("shop.html", shop_items=shop_items, error=1)
if item_obj.phone == '+7777-(777)-777777':
db.User().delete_login(current_user.login)
return render_template("shop.html", shop_items=shop_items, flag='YauzaCTF{$M$_B000mb3r_$$t1_vu1n}')
return render_template("shop.html", shop_items=shop_items, success=1)Intended



Last updated