hitoshura25/cvefixes huggingface dataset:
CVE-2012-1188 (PHP, published 2012-09-26T00:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in Fork CMS before 3.2.7 allow remote attackers to inject arbitrary web script or HTML via the (1) type or (2) querystring parameters to private/en/error or (3) name parameter to private/en/locale/index.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/modules/error/actions/index.php
Commit message: resolve xss vulnerability


Vulnerable code:
		$this->tpl->assign('message', BL::err(SpoonFilter::toCamelCase($errorType, '-')));

Fixed code:
		$this->tpl->assign('message', BL::err(SpoonFilter::toCamelCase(htmlspecialchars($errorType), '-')));
CVE-2012-1188 (PHP, published 2012-09-26T00:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in Fork CMS before 3.2.7 allow remote attackers to inject arbitrary web script or HTML via the (1) type or (2) querystring parameters to private/en/error or (3) name parameter to private/en/locale/index.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/modules/error/actions/index.php
Commit message: fix xss vulnerability


Vulnerable code:
				echo 'Requested file (' . implode('?', $chunks) . ') not found.';

Fixed code:
				echo 'Requested file (' . htmlspecialchars($this->getParameter('querystring')) . ') not found.';
CVE-2012-1207 (PHP, published 2012-02-24T13:55Z)
Description: value: Directory traversal vulnerability in frontend/core/engine/javascript.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allows remote attackers to read arbitrary files via a .. (dot dot) in the module parameter to frontend/js.php.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-22 \u2014 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Repository: https://github.com/forkcms/forkcms
Files changed:
frontend/core/engine/javascript.php
Commit message: XSS / LFI Fox


Vulnerable code:

Fixed code:
		$modules = (array) FrontendModel::getModules();
		
		if(!in_array((string) $value, $modules))
		{
			// when debug is on throw an exception
			if(SPOON_DEBUG) throw new FrontendException('Invalid file.');

			// when debug is of show a descent message
			else exit(SPOON_DEBUG_MESSAGE);
		}
CVE-2012-1208 (PHP, published 2012-02-24T13:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in backend/core/engine/base.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allow remote attackers to inject arbitrary web script or HTML via the (1) report parameter to blog/settings or (2) error parameter to users/index.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/core/engine/base.php
Commit message: This should fix the backend XSS.


Vulnerable code:
			$messageName = SpoonFilter::toCamelCase($this->getParameter('report'), '-');
			if($this->getParameter('highlight')) $this->tpl->assign('highlight', $this->getParameter('highlight'));
			$errorName = SpoonFilter::toCamelCase($this->getParameter('error'), '-');

Fixed code:
 * @author Frederik Heyninck <frederik@figure8.be>
			$messageName = SpoonFilter::toCamelCase(SpoonFilter::stripHTML($this->getParameter('report')), '-');
			if($this->getParameter('highlight')) $this->tpl->assign('highlight', SpoonFilter::stripHTML($this->getParameter('highlight')));
			$errorName = SpoonFilter::toCamelCase(SpoonFilter::stripHTML($this->getParameter('error')), '-');
CVE-2012-1208 (PHP, published 2012-02-24T13:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in backend/core/engine/base.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allow remote attackers to inject arbitrary web script or HTML via the (1) report parameter to blog/settings or (2) error parameter to users/index.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/core/engine/base.php
Commit message: Disallow html in the report.


Vulnerable code:
			$messageName = SpoonFilter::toCamelCase($this->getParameter('report'), '-');

Fixed code:
			$messageName = strip_tags(SpoonFilter::toCamelCase($this->getParameter('report'), '-'));
CVE-2012-1208 (PHP, published 2012-02-24T13:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in backend/core/engine/base.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allow remote attackers to inject arbitrary web script or HTML via the (1) report parameter to blog/settings or (2) error parameter to users/index.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/core/engine/base.php
Commit message: Make sure the error doesn't contain any html tags.


Vulnerable code:
			$errorName = SpoonFilter::toCamelCase($this->getParameter('error'), '-');

Fixed code:
			$errorName = strip_tags(SpoonFilter::toCamelCase($this->getParameter('error'), '-'));
CVE-2012-1209 (PHP, published 2012-02-24T13:55Z)
Description: value: Cross-site scripting (XSS) vulnerability in backend/core/engine/base.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allows remote attackers to inject arbitrary web script or HTML via the highlight parameter.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/core/engine/base.php
Commit message: This should fix the backend XSS.


Vulnerable code:
			$messageName = SpoonFilter::toCamelCase($this->getParameter('report'), '-');
			if($this->getParameter('highlight')) $this->tpl->assign('highlight', $this->getParameter('highlight'));
			$errorName = SpoonFilter::toCamelCase($this->getParameter('error'), '-');

Fixed code:
 * @author Frederik Heyninck <frederik@figure8.be>
			$messageName = SpoonFilter::toCamelCase(SpoonFilter::stripHTML($this->getParameter('report')), '-');
			if($this->getParameter('highlight')) $this->tpl->assign('highlight', SpoonFilter::stripHTML($this->getParameter('highlight')));
			$errorName = SpoonFilter::toCamelCase(SpoonFilter::stripHTML($this->getParameter('error')), '-');
CVE-2012-1209 (PHP, published 2012-02-24T13:55Z)
Description: value: Cross-site scripting (XSS) vulnerability in backend/core/engine/base.php in Fork CMS 3.2.4 and possibly other versions before 3.2.5 allows remote attackers to inject arbitrary web script or HTML via the highlight parameter.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
backend/core/engine/base.php
Commit message: Make sure the highlight string doesn't contain html tags.


Vulnerable code:
			if($this->getParameter('highlight')) $this->tpl->assign('highlight', $this->getParameter('highlight'));

Fixed code:
			if($this->getParameter('highlight'))
			{
				$this->tpl->assign('highlight', strip_tags($this->getParameter('highlight')));
			}
CVE-2012-5164 (PHP, published 2012-09-26T00:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in Fork CMS before 3.2.7 allow remote attackers to inject arbitrary web script or HTML via the term parameter to (1) autocomplete.php, (2) search/ajax/autosuggest.php, (3) livesuggest.php, or (4) save.php in frontend/modules/search/ajax.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
frontend/modules/search/ajax/autocomplete.php
frontend/modules/search/ajax/autosuggest.php
frontend/modules/search/ajax/livesuggest.php
frontend/modules/search/ajax/save.php
Commit message: XSS: Escape the input on ajax searches.


Vulnerable code:
		$term = SpoonFilter::getPostValue('term', null, '');
		$this->term = SpoonFilter::getPostValue('term', null, '');
		$this->term = SpoonFilter::getPostValue('term', null, '');
		$term = SpoonFilter::getPostValue('term', null, '');

Fixed code:
		$searchTerm = SpoonFilter::getPostValue('term', null, '');
		$term = (SPOON_CHARSET == 'utf-8') ? SpoonFilter::htmlspecialchars($searchTerm) : SpoonFilter::htmlentities($searchTerm);
		$searchTerm = SpoonFilter::getPostValue('term', null, '');
		$this->term = (SPOON_CHARSET == 'utf-8') ? SpoonFilter::htmlspecialchars($searchTerm) : SpoonFilter::htmlentities($searchTerm);
		$searchTerm = SpoonFilter::getPostValue('term', null, '');
		$this->term = (SPOON_CHARSET == 'utf-8') ? SpoonFilter::htmlspecialchars($searchTerm) : SpoonFilter::htmlentities($searchTerm);
		$searchTerm = SpoonFilter::getPostValue('term', null, '');
		$term = (SPOON_CHARSET == 'utf-8') ? SpoonFilter::htmlspecialchars($searchTerm) : SpoonFilter::htmlentities($searchTerm);
CVE-2012-5164 (Unknown, published 2012-09-26T00:55Z)
Description: value: Multiple cross-site scripting (XSS) vulnerabilities in Fork CMS before 3.2.7 allow remote attackers to inject arbitrary web script or HTML via the term parameter to (1) autocomplete.php, (2) search/ajax/autosuggest.php, (3) livesuggest.php, or (4) save.php in frontend/modules/search/ajax.
Severity: MEDIUM (CVSS v3 base score: )
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
Commit message: Merge pull request #247 from jelmersnoeck/xss-fix-ajax-search

XSS: Escape the input on ajax searches.

Vulnerable code:

Fixed code:
CVE-2014-9470 (PHP, published 2020-02-08T17:15Z)
Description: value: Cross-site scripting (XSS) vulnerability in the loadForm function in Frontend/Modules/Search/Actions/Index.php in Fork CMS before 3.8.4 allows remote attackers to inject arbitrary web script or HTML via the q_widget parameter to en/search.
Severity: MEDIUM (CVSS v3 base score: 6.1)
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
src/Frontend/Modules/Search/Actions/Index.php
Commit message: Don't directly inject $_GET parameters in html.

The Search module created a canonical tag containing a directly injected
$_GET parameter. This commit makes sure we encode specialcharacters
making XSS impossible. Fixes #1018


Vulnerable code:
            $canonicalUrl .= '?q=' . $_GET['q'];

Fixed code:
            $canonicalUrl .= '?q=' . \SpoonFilter::htmlspecialchars($_GET['q']);
CVE-2022-0145 (PHP, published 2022-03-24T11:15Z)
Description: value: Cross-site Scripting (XSS) - Stored in GitHub repository forkcms/forkcms prior to 5.11.1.
Severity: LOW (CVSS v3 base score: 5.4)
Weakness: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Repository: https://github.com/forkcms/forkcms
Files changed:
src/Backend/Modules/Extensions/Engine/Model.php
Commit message: Fix xss though the description in the info.xml file of a theme or module


Vulnerable code:
        $information['description'] = (string) $module->description;
        $information['description'] = (string) $theme->description;

Fixed code:
        $information['description'] = strip_tags((string) $module->description, '<h1><h2><h3><h4><h5><h6><p><li><a>');
        $information['description'] = strip_tags((string) $theme->description, '<h1><h2><h3><h4><h5><h6><p><li><a>');
CVE-2022-0153 (PHP, published 2022-03-24T17:15Z)
Description: value: SQL Injection in GitHub repository forkcms/forkcms prior to 5.11.1.
Severity: MEDIUM (CVSS v3 base score: 7.5)
Weakness: CWE-89 \u2014 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Repository: https://github.com/forkcms/forkcms
Files changed:
src/Backend/Modules/FormBuilder/Engine/Model.php
Commit message: Prevent sql injection through the ids of the action


Vulnerable code:

Fixed code:
        $ids = array_map('intval', $ids);
CVE-2022-1064 (PHP, published 2022-03-25T12:15Z)
Description: value: SQL injection through marking blog comments on bulk as spam in GitHub repository forkcms/forkcms prior to 5.11.1.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-89 \u2014 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Repository: https://github.com/forkcms/forkcms
Files changed:
src/Backend/Modules/Blog/Engine/Model.php
Commit message: Prevent sql injection through the ids of the blog comments


Vulnerable code:
            $ids

Fixed code:
            array_map('intval', $ids)
CVE-2022-22984 (TypeScript, published 2022-11-30T13:15Z)
Description: value: The package snyk before 1.1064.0; the package snyk-mvn-plugin before 2.31.3; the package snyk-gradle-plugin before 3.24.5; the package @snyk/snyk-cocoapods-plugin before 2.5.3; the package snyk-sbt-plugin before 2.16.2; the package snyk-python-plugin before 1.24.2; the package snyk-docker-plugin before 5.6.5; the package @snyk/snyk-hex-plugin before 1.1.6 are vulnerable to Command Injection due to an incomplete fix for [CVE-2022-40764](https://security.snyk.io/vuln/SNYK-JS-SNYK-3037342). A successful exploit allows attackers to run arbitrary commands on the host system where the Snyk CLI is installed by passing in crafted command line flags. In order to exploit this vulnerability, a user would have to execute the snyk test command on untrusted files. In most cases, an attacker positioned to control the command line arguments to the Snyk CLI would already be positioned to execute arbitrary commands. However, this could be abused in specific scenarios, such as continuous integration pipelines, where developers can control the arguments passed to the Snyk CLI to leverage this component as part of a wider attack against an integration/build pipeline. This issue has been addressed in the latest Snyk Docker images available at https://hub.docker.com/r/snyk/snyk as of 2022-11-29. Images downloaded and built prior to that date should be updated. The issue has also been addressed in the Snyk TeamCity CI/CD plugin as of version v20221130.093605.
Severity: nan (CVSS v3 base score: 6.3)
Weakness: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Repository: https://github.com/snyk/snyk-sbt-plugin
Files changed:
.snyk
lib/index.ts
lib/sub-process.ts
package.json
test/functional/sbt-plugin.test.ts
Commit message: fix: escape child process arguments


Vulnerable code:
  let args = ['"-Dsbt.log.noformat=true"'];
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',
    '"-Dsbt.log.noformat=true\"',

Fixed code:
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.19.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
  'snyk:lic:npm:shescape:MPL-2.0':
    - '*':
        reason: None Given
        expires: 2122-12-29T08:01:32.423Z
        created: 2022-11-29T08:01:32.424Z
patch: {}
  let args = ['-Dsbt.log.noformat=true'];
import { quoteAll } from 'shescape';
  args = quoteAll(args, spawnOptions);
    "shescape": "1.6.1",
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
    '-Dsbt.log.noformat=true',
CVE-2023-44488 (C, published 2023-09-30T20:15Z)
Description: value: VP9 in libvpx before 1.13.1 mishandles widths, leading to a crash related to encoding.
Severity: nan (CVSS v3 base score: 7.5)
Weakness: CWE-755 \u2014 Improper Handling of Exceptional Conditions
The product does not handle or incorrectly handles an exceptional condition.
Repository: https://github.com/webmproject/libvpx
Files changed:
test/resize_test.cc
vp9/common/vp9_alloccommon.c
vp9/encoder/vp9_encoder.c
Commit message: Fix bug with smaller width bigger size

Fixed previous patch that clusterfuzz failed on.

Local fuzzing passing overnight.

Bug: webm:1642
Change-Id: If0e08e72abd2e042efe4dcfac21e4cc51afdfdb9
(cherry picked from commit 263682c9a29395055f3b3afe2d97be1828a6223f)


Vulnerable code:
    if (frame < 100) {
      *w = initial_w * 7 / 10;
      *h = initial_h * 16 / 10;
      return;
    }
// TODO(https://crbug.com/webm/1642): This causes a segfault in
// init_encode_frame_mb_context().
TEST_P(ResizeRealtimeTest, DISABLED_TestExternalResizeSmallerWidthBiggerSize) {

  if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
    // Create the segmentation map structure and set to 0.
    free_seg_map(cm);
    if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
  }

    memset(cpi->consec_zero_mv, 0,
           cm->mi_rows * cm->mi_cols * sizeof(*cpi->consec_zero_mv));

Fixed code:
    *w = initial_w * 7 / 10;
    *h = initial_h * 16 / 10;
TEST_P(ResizeRealtimeTest, TestExternalResizeSmallerWidthBiggerSize) {
  if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
    // Create the segmentation map structure and set to 0.
    free_seg_map(cm);
    if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
  }

static void free_copy_partition_data(VP9_COMP *cpi) {
  vpx_free(cpi->prev_partition);
  cpi->prev_partition = NULL;
  vpx_free(cpi->prev_segment_id);
  cpi->prev_segment_id = NULL;
  vpx_free(cpi->prev_variance_low);
  cpi->prev_variance_low = NULL;
  vpx_free(cpi->copied_frame_cnt);
  cpi->copied_frame_cnt = NULL;
}

      vp9_free_pc_tree(&cpi->td);
      vpx_free(cpi->mbmi_ext_base);
    vpx_free(cpi->consec_zero_mv);
    CHECK_MEM_ERROR(
        cm, cpi->consec_zero_mv,
        vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cpi->consec_zero_mv)));

    vpx_free(cpi->skin_map);
    CHECK_MEM_ERROR(
        cm, cpi->skin_map,
        vpx_calloc(cm->mi_rows * cm->mi_cols, sizeof(cpi->skin_map[0])));

    free_copy_partition_data(cpi);
    alloc_copy_partition_data(cpi);