GHSA-47qg-q58v-7vrp: Amundsen frontend UNEDITABLE_SCHEMAS And UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES Not Respected Vulnerability

LOW
CWE-602
Published
Advisory Summary

GHSA-47qg-q58v-7vrp is a LOW uneditable_schemas and uneditable_table_description_match_rules not respected vulnerability (CWE-602: Client-Side Enforcement of Server-Side Security) affecting Amundsen frontend libraries in the PyPI ecosystem. The issue involves uneditable_schemas and uneditable_table_description_match_rules not respected by frontend service backend. Remediation is available by upgrading affected packages to version 3.1.0.

GHSA-47qg-q58v-7vrp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-47qg-q58v-7vrp
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-602: Client-Side Enforcement of Server-Side Security
Affected Product Amundsen frontend
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-47qg-q58v-7vrp

To remediate this vulnerability, upgrade all affected Amundsen frontend dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

amundsen-frontend fixed: 3.1.0
pip install amundsen-frontend>=3.1.0
amundsen-frontend fixed: 3.1.0
pip install amundsen-frontend>=3.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show amundsen-frontend

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-47qg-q58v-7vrp, inspect your installed packages using pip:

pip show amundsen-frontend

Analyze the terminal output to locate any version of Amundsen frontend in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.

Note: The pip show amundsen-frontend command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-602: Client-Side Enforcement of Server-Side Security, where the product is composed of a server that relies on the client to implement a mechanism that is intended to protect the server. In Amundsen frontend, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Any install that has `UNEDITABLE_SCHEMAS` and/or `UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES` set in the front-end, is being impacted. The value of these properties is ignored if set, allowing any user to modify table and column descriptions, even though the properties imply they shouldn't be. ### Patches There is an attached PR that applies this restriction on the back-end. ### Workarounds N/A ### References N/A ### For more information If you have any questions or comments about this advisory: * Email us at [amundsen-security@lists.lfaidata.foundation](mailto:amundsen-security@lists.lfaidata.foundation) ### More details Summary: I believe that UNEDITABLE_SCHEMAS and UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES are only being applied on the front-end, not on the frontend service back-end, allowing any user to modify table and column descriptions even if this configuration parameter is set. Repro steps: 1. docker-compose -f docker-amundsen.yml up neo4j elasticsearch amundsensearch amundsenmetadata 2. python example/scripts/sample_data_loader.py 3. FRONTEND_SVC_CONFIG_MODULE_CLASS=amundsen_application.config.TestConfig PYTHONPATH=. python3 amundsen_application/wsgi.py 4. Attempt a modification to a table description: curl '<http://localhost:5000/api/metadata/v0/put_table_description>' \\\\ -X 'PUT' \\\\ -H 'Content-Type: application/json;charset=UTF-8' \\\\ --data-binary '{"description":"2t test table","key":"hive://gold.test_schema/test_table1","source":"user"}' {"msg":"Success"} 5. This correctly succeeds, which can be validated by GETing the info: curl '<http://localhost:5000/api/metadata/v0/get_table_description?key=hive://gold.test_schema/test_table1>' {"description":"1st test table","msg":"Success"} At this point, modify TestConfig inside config.py to add this line: UNEDITABLE_SCHEMAS = set(['test_schema']) You can now re-run step 4, and step 5 with different data, and confirm that the modification has persisted. If you build and run the UI, you can see that on the page <http://localhost:5000/table_detail/gold/hive/test_schema/test_table1> http://localhost:5000/table_detail/gold/hive/test_schema/test_table1, the inline editor is correctly disabled. Looking at amundsenfrontendlibrary/amundsen_application/api/metadata/v0.py:268 put_table_description, you can see there's no reference to UNEDITABLE_SCHEMAS or UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES. The only place I can find these referenced is in amundsenfrontendlibrary/amundsen_application/api/utils/metadata_utils.py:marshall_table_full, which would explain why the UI is correctly respecting this setting. If this is correct, put_column_description would also be similarly affected. I believe the correct fix for all of these methods is to load the table, run it through marshall_dashboard_partial to fully evaluate what's editable or not (to reuse the same code path for FE and back-end), and reject the response if it's not editable. I'll implement a fix along these lines once someone confirms this. History: This functionality was introduced in <https://github.com/amundsen-io/amundsenfrontendlibrary/pull/497/files> https://github.com/amundsen-io/amundsenfrontendlibrary/pull/497 on July 9, corresponding to the 2.3.0 release of amundsenfrontend. That release was introduced into the main repo dockerfile on October 28 in <https://github.com/amundsen-io/amundsen/pull/785> https://github.com/amundsen-io/amundsen/pull/785

GHSA-47qg-q58v-7vrp Affected Amundsen frontend Versions

2 component(s)
Fixed Versions:
3.1.0
Product / Package Ecosystem Affected Versions Fixed Version
amundsen-frontend
PyPI
≥ 2.3.0
< 3.1.0
All 1 versions
2.3.0
3.1.0
amundsen-frontend
PyPI
≥ 3.0.0
< 3.1.0
All 1 versions
3.0.0
3.1.0

References

Frequently Asked Questions

What is GHSA-47qg-q58v-7vrp?
GHSA-47qg-q58v-7vrp is a security vulnerability in Amundsen frontend involving UNEDITABLE_SCHEMAS and UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES not respected by frontend service backend under CWE-602: Client-Side Enforcement of Server-Side Security.
Which Amundsen frontend versions are affected?
Affected versions include releases prior to 3.1.0 across affected packages: amundsen-frontend.
What version fixes GHSA-47qg-q58v-7vrp?
Upgrading to 3.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is amundsen-frontend affected?
Yes, amundsen-frontend is affected in releases prior to 3.1.0. Upgrade your dependency to 3.1.0 or later.
What CWE is associated with GHSA-47qg-q58v-7vrp?
GHSA-47qg-q58v-7vrp is classified under CWE-602: Client-Side Enforcement of Server-Side Security (The product is composed of a server that relies on the client to implement a mechanism that is intended to protect the server.).
How can I check PyPI dependencies for GHSA-47qg-q58v-7vrp?
Run the dependency tree command: 'pip show amundsen-frontend'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-47qg-q58v-7vrp",
  "modified" : "2020-12-02T02:18:42Z",
  "published" : "2020-12-02T18:28:10Z",
  "aliases" : [ ],
  "summary" : "UNEDITABLE_SCHEMAS and UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES not respected by frontend service backend",
  "details" : "### Impact\nAny install that has `UNEDITABLE_SCHEMAS` and/or `UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES` set in the front-end, is being impacted. The value of these properties is ignored if set, allowing any user to modify table and column descriptions, even though the properties imply they shouldn't be.\n\n### Patches\nThere is an attached PR that applies this restriction on the back-end.\n\n### Workarounds\nN/A\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [amundsen-security@lists.lfaidata.foundation](mailto:amundsen-security@lists.lfaidata.foundation)\n\n### More details\nSummary: I believe that UNEDITABLE_SCHEMAS and\nUNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES are only being applied on the\nfront-end, not on the frontend service back-end, allowing any user to\nmodify table and column descriptions even if this configuration parameter\nis set.\n\nRepro steps:\n\n1. docker-compose -f docker-amundsen.yml up neo4j elasticsearch\namundsensearch amundsenmetadata\n2. python example/scripts/sample_data_loader.py\n3. FRONTEND_SVC_CONFIG_MODULE_CLASS=amundsen_application.config.TestConfig\nPYTHONPATH=. python3 amundsen_application/wsgi.py\n4. Attempt a modification to a table description:\n\ncurl '<http://localhost:5000/api/metadata/v0/put_table_description>' \\\\\\\\\n-X 'PUT' \\\\\\\\\n-H 'Content-Type: application/json;charset=UTF-8' \\\\\\\\\n--data-binary '{\"description\":\"2t test table\",\"key\":\"hive://gold.test_schema/test_table1\",\"source\":\"user\"}'\n{\"msg\":\"Success\"}\n\n\n\n5. This correctly succeeds, which can be validated by GETing the info:\n\ncurl '<http://localhost:5000/api/metadata/v0/get_table_description?key=hive://gold.test_schema/test_table1>'\n{\"description\":\"1st test table\",\"msg\":\"Success\"}\n\n\nAt this point, modify TestConfig inside config.py to add this line: UNEDITABLE_SCHEMAS\n= set(['test_schema'])\n\nYou can now re-run step 4, and step 5 with different data, and confirm\nthat the modification has persisted. If you build and run the UI, you can\nsee that on the page\n<http://localhost:5000/table_detail/gold/hive/test_schema/test_table1>\nhttp://localhost:5000/table_detail/gold/hive/test_schema/test_table1, the\ninline editor is correctly disabled.\n\nLooking at\namundsenfrontendlibrary/amundsen_application/api/metadata/v0.py:268\nput_table_description, you can see there's no reference to\nUNEDITABLE_SCHEMAS or UNEDITABLE_TABLE_DESCRIPTION_MATCH_RULES.\n\nThe only place I can find these referenced is in\namundsenfrontendlibrary/amundsen_application/api/utils/metadata_utils.py:marshall_table_full,\nwhich would explain why the UI is correctly respecting this setting.\n\nIf this is correct, put_column_description would also be similarly\naffected.\n\nI believe the correct fix for all of these methods is to load the table,\nrun it through marshall_dashboard_partial to fully evaluate what's\neditable or not (to reuse the same code path for FE and back-end), and\nreject the response if it's not editable. I'll implement a fix along these\nlines once someone confirms this.\n\nHistory: This functionality was introduced in\n<https://github.com/amundsen-io/amundsenfrontendlibrary/pull/497/files>\nhttps://github.com/amundsen-io/amundsenfrontendlibrary/pull/497 on July\n9, corresponding to the 2.3.0 release of amundsenfrontend. That release was\nintroduced into the main repo dockerfile on October 28 in\n<https://github.com/amundsen-io/amundsen/pull/785>\nhttps://github.com/amundsen-io/amundsen/pull/785",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "amundsen-frontend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "3.1.0"
      } ]
    } ],
    "versions" : [ "2.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "amundsen-frontend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.1.0"
      } ]
    } ],
    "versions" : [ "3.0.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/amundsen-io/amundsenfrontendlibrary/security/advisories/GHSA-47qg-q58v-7vrp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amundsen-io/amundsenfrontendlibrary/commit/0b47694ea74cbbef34e03eb45f29643b16a1332a"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-602" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-12-02T02:18:42Z",
    "nvd_published_at" : null
  }
}