Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Bug] Reflected XSS Pada Modul Bibliography di Parameter Keywords #98

Open
jrsfaisal opened this issue Jun 21, 2018 · 1 comment

Comments

@jrsfaisal
Copy link

jrsfaisal commented Jun 21, 2018

Halo,

Saya menemukan bug reflected pada module Bibliography di parameter keywords. Melalui bug ini dapat berdampak antara lain,

  • Dapat digunakan untuk mengambil cookie admin yang sedang login.
  • Dapat digunakan untuk redirect ke malicious site yang mengandung malware.
  • Dapat digunakan untuk mendowload malware.

Proof of Concepts

  1. Kunjungi menu bibliography melalui URL http://192.168.100.18:81/slims/admin/index.php
  2. Masukan payload xss contohnya atau <script>alert(document.cookie)</script>
    pada search box.
  3. XSS akan tertriger pada URL http://192.168.100.18:81/slims/admin/modules/bibliography/index.php?keywords=%3Cimg+src%3Dx+onerror%3Dalert(document.cookie)%3E

1_reflectedxss_module_bibliography
1_reflectedxss_module_bibliography_2

@drajathasan
Copy link
Contributor

if (isset($_GET['keywords']) AND $_GET['keywords']) { $msg = str_replace('{result->num_rows}', $datagrid->num_rows, __('Found <strong>{result->num_rows}</strong> from your keywords')); //mfc echo '<div class="infoBox">'.$msg.' : "'.**$_GET['keywords']**.'"<div>'.__('Query took').' <b>'.$datagrid->query_time.'</b> '.__('second(s) to complete').'</div></div>'; //mfc }

parameter $_GET['keywords'] '

'.$msg.' : "'.$_GET['keywords'].'"
'. tidak difilter.

Solusi
Menambahkan filter htmlentities
echo '<div class="infoBox">'.$msg.' : "'.htmlentities($_GET['keywords']).'"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants