Community ShareApplication · Alfresco

CVE-2021-41791

MEDIUM · 5.4 CVSS v3.1 Published 2021-10-21
Fix available
A fix is available. Upgrade to after 7.0 or later.
See remediation →
58/100
Remediation priority · Elevated
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
An issue was discovered in Hyland org.alfresco:share through 7.0.0.2 and org.alfresco:community-share through 7.0. An evasion of the XSS filter for HTML input validation in the Alfresco Share User Interface leads to stored XSS that could be exploited by an attacker (given that he has privileges on the content collaboration features).

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

Stored XSS vulnerability in Alfresco Share UI where the HTML input validation filter can be evaded, allowing authenticated users with content collaboration privileges to inject malicious scripts that execute when other users view the compromised content.

MitigationImplement proper HTML sanitization and output encoding on all user input fields, update to patched version if available, and apply Content Security Policy headers to mitigate XSS execution.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Community ShareApplication
Affected:<= 7.0
ShareApplication
Affected:>= 5.0.0.0, <= 5.2.7.11>= 6.0.1.0, <= 6.0.1.2>= 6.0.2.0, <= 6.2.2.4>= 6.1.1.0, <= 6.1.1.2= 7.0= 7.0.0.1= 7.0.0.2= 7.0.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Alfresco Share version
    Navigate to the Share UI footer or check the alfresco-share.war file version manifest. Alternatively, check the tomcat/webapps/alfresco-share/WEB-INF/lib folder for share-community JAR files or the alfresco-version.properties file in the installation directory.
    Affected if The installed version matches one of the affected ranges: 5.0.0.0 to 5.2.7.11, 6.0.1.0 to 6.0.1.2, 6.0.2.0 to 6.2.2.4, 6.1.1.0 to 6.1.1.2, 7.0, 7.0.0.1, 7.0.0.2, 7.0.1, or Community Edition 7.0 and below.
  2. Verify HTML input validation filter configuration
    Locate the share-config-custom.xml or share-config.xml file in the tomcat/shared/classes/alfresco/web-extension directory. Inspect the HTML validation filter settings, specifically looking for input validation patterns that can be bypassed.
    Affected if The HTML input validation filter is configured and active without proper sanitization or allowlist-based filtering.
  3. Check user content collaboration privileges
    In the Alfresco Admin Console or Share UI user management section, identify users assigned the Content Collaborator role or equivalent permissions. Use the API endpoint /alfresco/service/api/people to enumerate users with collaborator-level access.
    Affected if Authenticated users with content collaboration or contributor privileges exist in the system.
  4. Inspect content metadata for injected scripts
    Access the Alfresco Share document library via the UI or use the REST API endpoint /alfresco/service/api/metadata?nodeRef=WORKSPACE://SpacesStore/ to inspect node properties. Check fields like description, title, and tags for unsanitized HTML or script tags.
    Affected if User-generated content fields contain unencoded HTML script tags, iframe elements, or event handler attributes (onclick, onerror, etc.).
  5. Review Content Security Policy headers
    Use browser developer tools or a command-line tool like curl to inspect HTTP response headers from the Share application. Look for CSP headers: curl -I https://your-server/share/page.
    Affected if Content Security Policy headers are missing or do not include unsafe-inline restrictions for script sources.

Your environment is affected if you run an affected Alfresco Share version AND have HTML input validation enabled with authenticated users holding content collaboration privileges, as the filter can be evaded to store malicious scripts.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 7.0
Interim mitigation

Implement proper HTML sanitization and output encoding on all user input fields, update to patched version if available, and apply Content Security Policy headers to mitigate XSS execution.

Recommended fix Moderate confidence

Latest stable 7.x release (recommended: Community Share 7.0.1 or later, or Share 6.2.x/7.x)

  1. 1. Identify the exact current Alfresco Share or Community Share version deployed using the Alfresco admin console or about.xed endpoint
  2. 2. For Community Share: upgrade to version 7.0.1 or later (the next release after the affected 7.0.0.2)
  3. 3. For Alfresco Share (non-community): upgrade to a version higher than your current branch: 5.2.8 or later for 5.x line; 6.0.1.3 or later for 6.0.1.x line; 6.1.1.3 or later for 6.1.1.x line; 6.2.2.5 or later for 6.2.2.x line
  4. 4. After upgrade, verify the XSS filter properly sanitizes HTML input in content collaboration features
  5. 5. Test that stored XSS payloads are no longer executable in the Share UI
Caveat Review release notes for your target version for any breaking changes between your current and target version; major version jumps may require migration testing

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Community Share Scoped from the published advisory
  • Consultation4.0 h
  • Implementation16.0 h
  • Testing8.0 h
  • Review / QA4.0 h
32.0 hours of engineering $5,600
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $8,960.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-41791 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-41791 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data